From: Matthias Kilian Date: Thu, 15 Apr 2010 14:04:52 +0000 (+0000) Subject: Ignore the return code of c_fcntl_write again X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8ea4138dd177524ef650e5be230a19bcd203f681;hp=18d76310cb679667c9d3e491277c283a0dccee06;p=ghc-base.git 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 --- 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