From 072850565fab361eb7b97ed37b8cdd078e45dd26 Mon Sep 17 00:00:00 2001 From: Matthias Kilian Date: Mon, 19 Apr 2010 15:54:21 +0000 Subject: [PATCH] Move comment closer to the offending line --- System/Posix/Internals.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs index 10fa3d2..31b4fff 100644 --- a/System/Posix/Internals.hs +++ b/System/Posix/Internals.hs @@ -321,12 +321,12 @@ setNonBlockingFD :: FD -> Bool -> IO () setNonBlockingFD fd set = do flags <- throwErrnoIfMinus1Retry "setNonBlockingFD" (c_fcntl_read fd const_f_getfl) - -- An error when setting O_NONBLOCK isn't fatal: on some systems - -- there are certain file handles on which this will fail (eg. /dev/null - -- on FreeBSD) so we throw away the return code from fcntl_write. let flags' | set = flags .|. o_NONBLOCK | otherwise = flags .&. complement o_NONBLOCK unless (flags == flags') $ do + -- An error when setting O_NONBLOCK isn't fatal: on some systems + -- there are certain file handles on which this will fail (eg. /dev/null + -- on FreeBSD) so we throw away the return code from fcntl_write. _ <- c_fcntl_write fd const_f_setfl (fromIntegral flags') return () #else -- 1.7.10.4