> After much study I have a new theory.  It appears that the 
> pipe machinery
> is working fine, but that sometimes my program fails to 
> "reap" all of its
> terminated child processes.  I'm using a `sigCHLD` signal handler that
> does `getAnyProcessStatus True False` each time it's invoked. 
>  It seems
> that one or more `sigCHLD` signals are occurring while an 
> instance of the
> handler is already running (having presumably blocked 
> `sigCHLD` during its
> execution), and hence the "contemporaneous" signals are getting lost.
> (Oh, and it seems this unfortunate behavior occurs for me 
> under Linux but
> not Solaris.)
> 
> How can I avoid losing `sigCHLD` signals?
> 
> It seems that use of the `SA_NODEFER` flag on `sigaction` might do the
> trick, but that flag is not accessible via `installHandler`.

I can't see a reason why SIGCHLD signals might be lost, but the handler
might be deferred in the way that Volker described if you have blocking
C calls.

Perhaps you could investigate with strace and see if the signal is
actually being delivered?

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

Reply via email to