[plt-scheme] subprocess: double fork() to avoid zombies
> > The idea being that in a lot of practical cases you don't care about
> > a child's exit status. Doing it like this still allows you to shut
> > down a child by closing its input port, which by most tools is
> > interpreted as "exit", without ever having to care about zombie
> > processes caused by not performing wait().
>
> How is this different? Specifically, you have wait() synchronising on
> the forking subprocess, but you still need a different wait() for the
> child that it creates -- no?
Because the middle process dies before its child, the child is inherited
by the `init' process. I believe this is the standard way on unix to
start a daemon.