From 8ea4138dd177524ef650e5be230a19bcd203f681 Mon Sep 17 00:00:00 2001 From: Matthias Kilian Date: Thu, 15 Apr 2010 14:04:52 +0000 Subject: [PATCH 1/1] Ignore the return code of c_fcntl_write again The return code has been ignored in the past on purpose, because O_NONBLOCK will fail on BSDs for some special files. This fixes the problem mentioned in http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018698.html --- System/Posix/Internals.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 2ea9fb1..10fa3d2 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -327,8 +327,8 @@ setNonBlockingFD fd set = do let flags' | set = flags .|. o_NONBLOCK | otherwise = flags .&. complement o_NONBLOCK unless (flags == flags') $ do - throwErrnoIfMinus1Retry_ "fcntl_write" $ - c_fcntl_write fd const_f_setfl (fromIntegral flags') + _ <- c_fcntl_write fd const_f_setfl (fromIntegral flags') + return () #else -- bogus defns for win32 -- 1.7.10.4