Comment 5 for bug 185601

Revision history for this message
Derick Eddington (derick-eddington) wrote : Re: [Bug 185601] Need to be able to test if process failed

On Mon, 2008-03-31 at 09:53 +0000, Abdulaziz Ghuloum wrote:
> On Mar 31, 2008, at 1:43 AM, Derick Eddington wrote:
>
> > But if you exec a process with which you do not attempt any I/O (i.e.,
> > because the program isn't designed to do any), there's still no way to
> > know if it succeeded or failed.
>
> Well, if the program is designed not to do any IO, then reading from the
> output-port and error-port that process returns should both return #!
> eof

Maybe the parent Scheme program is a shell / general launcher and
doesn't know what the child will do.

> Please do let me know if you find a solution (or a system that has
> found
> a solution).

Will do, but might be a while. This must have been solved more than
once before you'd think, no? 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?