projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
91b6357
)
fix bug in partial writes
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 23 Jun 2009 10:50:04 +0000
(10:50 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 23 Jun 2009 10:50:04 +0000
(10:50 +0000)
GHC/IO/FD.hs
patch
|
blob
|
history
diff --git
a/GHC/IO/FD.hs
b/GHC/IO/FD.hs
index
76c0242
..
44490fb
100644
(file)
--- a/
GHC/IO/FD.hs
+++ b/
GHC/IO/FD.hs
@@
-398,7
+398,7
@@
fdWrite fd ptr bytes = do
res <- writeRawBufferPtr "GHC.IO.FD.fdWrite" fd ptr 0 (fromIntegral bytes)
let res' = fromIntegral res
if res' < bytes
res <- writeRawBufferPtr "GHC.IO.FD.fdWrite" fd ptr 0 (fromIntegral bytes)
let res' = fromIntegral res
if res' < bytes
- then fdWrite fd (ptr `plusPtr` bytes) (bytes - res')
+ then fdWrite fd (ptr `plusPtr` res') (bytes - res')
else return ()
-- XXX ToDo: this isn't non-blocking
else return ()
-- XXX ToDo: this isn't non-blocking