|
ghc's hPutBuf doesn't obey the buffering mode: msg#00067lang.haskell.glasgow.bugs
If I run this program: -------------------------------------------------- import System.Cmd (system) import Foreign.C.String (castCharToCChar) import Foreign.Marshal.Array (newArray) import System.IO (hSetBinaryMode, hPutBuf, stdout, hSetBuffering, BufferMode(..)) main = do hSetBinaryMode stdout True hSetBuffering stdout LineBuffering p <- newArray (map castCharToCChar "foo\n") hPutBuf stdout p 4 system "sleep 5" putStr "bar\n" -------------------------------------------------- compiled by GHC then it waits 5 seconds and then prints foo and bar together. With hugs, foo is printed and then 5 seconds later bar is printed, as I would expect. Thanks Ian
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1183455 ] Possible error using concurrency, SourceForge.net |
|---|---|
| Next by Date: | RE: cvs head, winxp, make fails to make target `HSwin32.o', needed by `all'., Simon Peyton-Jones |
| Previous by Thread: | [ ghc-Bugs-1183455 ] Possible error using concurrency, SourceForge.net |
| Next by Thread: | RE: ghc's hPutBuf doesn't obey the buffering mode, Simon Marlow |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |