
22 Nov
2001
22 Nov
'01
8:43 a.m.
In local.glasgow-haskell-users, you wrote:
main = do d <- connectTo "localhost" (PortNumber 80) hPutStr d "GET / HTTP/1.0\n\n" hFlush d c <- hGetContents d putStr c
whereas on Linux I get the following error: *** Exception: failed Action: connect Reason: Unknown error 142731264
Please run the program with 'strace', e.g. strace -o log ./a.out and post the log when it fails. Be aware that 'hGetContents' is broken on 5.02.1 if you use it extensively (the GC will close already-reused fds and cause your program to crash!), the patch was recently postet to -bugs by Simon Marlow and works. OTOH, this is not the bug you're seeing. -- Volker Stolz * stolz@i2.informatik.rwth-aachen.de * PGP + S/MIME