#5843: hGetBufSome blocks when all available input is buffered (on Windows only)
-------------------------------+--------------------------------------------
Reporter: joeyadams | Owner: pcapriotti
Type: bug | Status: new
Priority: high | Milestone: 7.4.2
Component: libraries/base | Version: 7.2.2
Keywords: | Os: Windows
Architecture: x86 | Failure: Incorrect result at runtime
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
-------------------------------+--------------------------------------------
Comment(by simonmar):
Duncan: we don't have a way to do non-blocking I/O on Windows, but
`hGetSome` is supposed to work around that.
There is probably some fault in the logic in `bufReadNBNonEmpty`, because
it is not supposed to try to read any more data when called by
`hGetBufSome`, see the comment:
{{{
bufReadNBNonEmpty h_ buf' (castPtr
ptr) 0 (min r count)
-- new count is (min r count), so
-- that bufReadNBNonEmpty will not
-- issue another read.
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5843#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs