core files under SV

Conor P. Cahill cpcahil at virtech.uucp
Sun Nov 19 11:54:17 AEST 1989


In article <29843 at iuvax.cs.indiana.edu>, bobmon at iuvax.cs.indiana.edu (RAMontante) writes:
> gwyn at brl.arpa (Doug Gwyn) <11616 at smoke.BRL.MIL> :
    [example of using double fork to not have to wait for children to die AND
     still not have to worry about zombies...]

> Um, I don't see why this "reaps the zombies".  I thought the `wait(pid)'
> call was added to clean up the aborted child --- here the child is
> wait()'ed on, but the grandchild looks just like the child did in the
> original version.

Because when your parent dies init then becomes your parent.  init spends
most of it's time waiting to clean up orphaned processes.

In the example the child forked the grand-child and immediatly exited
therefore the grandchild was an orphaned process.

-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list