projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move comment closer to the offending line
[ghc-base.git]
/
System
/
Posix
/
Internals.hs
diff --git
a/System/Posix/Internals.hs
b/System/Posix/Internals.hs
index
10fa3d2
..
31b4fff
100644
(file)
--- 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)
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
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
_ <- c_fcntl_write fd const_f_setfl (fromIntegral flags')
return ()
#else