> 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

threadWaitRead/Write on a closed file descriptor causes this crash (in fact,
you reported this bug some time ago).  Do you have another thread trying to
read/write from the handle you just closed?

I don't know what could cause GHC to hang at the end of the program, except
perhaps some kind of deadlock involving the finalizers, which is conceivably
possible.  We'll need to narrow down the example somewhat though.

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to