I think I've narrowed the problem down a bit further. It looks as if the reason GHC is
hanging after the end of the main action is that there's a handle still open to a
socket
(to another process). If I hClose the handle explicitly before the end of the main
action,
the hClose action returns (I get a message printed afterwards to prove it) and then the
following happens:
select: Bad file descriptor
test1: fatal error: select failed
I don't use the Posix.select function or whatever it's called anywhere explicitly, so
it looks
as if it's a bug in GHC (maybe the socket handle is somehow in a bad state). Still at
least
the program crashes at the end of the main action, rather than hanging, which is an
improvement.
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs