Program won't go away!

George Russell ger at Informatik.Uni-Bremen.DE
Thu Oct 19 08:50:55 EDT 2000


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.




More information about the Glasgow-haskell-bugs mailing list