On 10 Dec 2004, at 06:28, Michael Walter wrote:

Yep - this program "sometimes" fails for me with such an error message:

  Fail: <socket: 8>: hGetLine: invalid argument (Invalid argument)


The underlying C library function 'accept' doesn't always return a socket. Sometimes it returns '-1' if something went wrong, or if there weren't any connections to accept and the handle was non-blocking.


I could well imagine that if hGetLine was passed a Handle which was -1 it would give invalid argument, so this is a workable hypothesis. Of course, I'd expect the implementation of haskell accept to throw an exception in this case, but maybe it doesn't?

Jules

_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to