Need help spawning a child

nickolas.landsberg npl at cbnewsi.ATT.COM
Fri Jun 30 03:13:32 AEST 1989


The old tried and true method (before SIGCLD) and which, I think, also
worked for BSD systems, was to run the processes as "grandchildren."
Parent does a fork() and a wait();
Child Does a fork() and an exit(); (init inherits grandchild)
Grandchild executes normally.

Since the "parent" waited for it's "child," no zombie there.
Since init inherits all "orphans," and also does wait()'s, no zombie
there either.  The length of time the parent wait()'s is minimal, since
the exit() out of the child occurs almost immediately.



More information about the Comp.unix.questions mailing list