Ignore the return code of c_fcntl_write again
authorMatthias Kilian <kili@outback.escape.de>
Thu, 15 Apr 2010 14:04:52 +0000 (14:04 +0000)
committerMatthias Kilian <kili@outback.escape.de>
Thu, 15 Apr 2010 14:04:52 +0000 (14:04 +0000)
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

index 2ea9fb1..10fa3d2 100644 (file)
@@ -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