Comment 6 for bug 185601

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 185601] Need to be able to test if process failed

On Mar 31, 2008, at 11:48 PM, Derick Eddington wrote:

> This must have been solved more than once before you'd think, no?

I would think.

> I remember hearing a brief description of
> this specific problem years ago. It does seem like POSIX does not
> give
> one a reliable non-blocking non-race-problem way to know, unless you
> listen for SIGCHLD with the POSIX signal handlers facility, which I've
> been guessing is not compatible / desireable with Ikarus's
> architecture.
> Is that the case? Should we exclude solutions using a SIGCHLD signal
> handler?

Not necessarily. If this is the only way to solve it, then, we have
to solve it. But I don't see (off the top of my head) how catching
SIGCHLD would solve it. Usually you catch SIGCHLD so that it
collects the dead children if you don't want to wait on them
yourself. I don't see how it can be used to "test if process
failed". Maybe my way of doing process (fork then exec) is not the
right way but I don't know what is.