wait(2) [Slight correction]
Mike Gunter
m@ryangunter.com
27 Jul 2001 11:58:45 -0700
[My previous message omitted a word ("records"). I should take one
more look at these things before sending them.]
Scsh (Scheme Shell) has a mechanism to turn the Unix process interface
into something reasonable. Instead of PIDs, fork returns a process
object. The SIGCHLD signal handler reaps processes and records their
exit status. The program can retrieve the exit status using the
process object. When the process object is GCed, the status can be as
well. This seems be right for almost all code (and reaping policy can
be changed for the remaining code.)
The details of Scsh's mechanism can be found in the manual
ftp://ftp-swiss.ai.mit.edu/pub/su/scsh/scsh-manual.ps
on pages 55-58.
mike