Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsi!npl From: npl@cbnewsi.ATT.COM (nickolas.landsberg) Newsgroups: comp.unix.questions Subject: Re: Need help spawning a child Summary: Historical Method Message-ID: <352@cbnewsi.ATT.COM> Date: 29 Jun 89 17:13:32 GMT References: <1661@apt.UUCP> <873@cbnewsl.ATT.COM> <12131@bloom-beacon.MIT.EDU> <945@cbnewsl.ATT.COM> Distribution: usa Organization: AT&T Bell Laboratories Lines: 11 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.