|
[ ghc-Bugs-1289569 ] hPutBuf doesn't respect LineBuffering: msg#00053lang.haskell.glasgow.bugs
Bugs item #1289569, was opened at 2005-09-13 09:44 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1289569&group_id=8032 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: libraries/base Group: 6.4 Status: Open Resolution: None Priority: 3 Submitted By: Simon Marlow (simonmar) Assigned to: Simon Marlow (simonmar) Summary: hPutBuf doesn't respect LineBuffering Initial Comment: On 15 April 2005 02:39, Ian Lynagh wrote: > 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. True, the implementation doesn't respect LineBuffering (though it does respect the other buffering modes, I believe). That's a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108032&aid=1289569&group_id=8032
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1186741 ] stack overflow when loading a big, SourceForge.net |
|---|---|
| Next by Date: | [ ghc-Bugs-1285326 ] scavenge_one: strange object 47, SourceForge.net |
| Previous by Thread: | [ ghc-Bugs-1186741 ] stack overflow when loading a big, SourceForge.net |
| Next by Thread: | [ ghc-Bugs-1289573 ] mkProtoBCO: stack use won't fit in 16 bits 79141, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |