sigCHLD signal handling (Was: Re: pipes? threadWaitRead?)
Simon Marlow
simonmar at microsoft.com
Wed Jul 10 05:03:27 EDT 2002
> The fine points of Unix signal semantics have always been somewhat
> mysterious to me. However, after digging around in man pages
> for a while,
> I have a theory as to what's going "wrong"...
Yes, your diagnosis looks very plausible.
The right way, I believe, to handle this in your signal handler is to
call getAnyProcessStatus repeatedly until it doesn't return any more
children (not forgetting to use the non-blocking version, ie. the first
arg should be False). Does that help?
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list