id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2109,hIsEOF blocks when applied to a non-closed socket with no input available,Mads,,"As shown with the attached test-programs, hIsEOF will block when
applied to a socket-handle that is not closed and has no input
available.

I believe that hIsEOF blocks, as it calls hLookAhead (see
libraries/base/GHC/Handle.hs), which blocks when there is no
input. Note that this is only a problem when using sockets, as (local)
files will either be EOF or has some content.

If hIsEOF blocking nature is expected behaviour, then I think it
should be noted in the haddock-documentation, as it seems
non-obvious. Especially, as it will seem non-blocking when working
with files.

I am using GHC 6.8.2 on a Debian Linux box.

To reproduce the bug, then first compile the test programs using the
accompanying makefile. Then start the server. After that the
client. As can be seen, the server will hang.
",bug,closed,normal,,libraries/base,6.8.2,invalid,hIsEOF blocks sockets,,Linux,x86,,,,,,
