Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!clyde!cuae2!ihnp4!cbatt!cwruecmp!hal!ncoast!tdi2!brandon
From: brandon@tdi2.UUCP (Brandon Allbery)
Newsgroups: comp.unix.wizards
Subject: ZOMBIE processes under sys5
Message-ID: <119@tdi2.UUCP>
Date: Fri, 12-Dec-86 12:29:20 EST
Article-I.D.: tdi2.119
Posted: Fri Dec 12 12:29:20 1986
Date-Received: Tue, 16-Dec-86 02:36:10 EST
References: <1327@brl-adm.ARPA> <165@hqda-ai.UUCP>
Reply-To: brandon@tdi2.UUCP (Brandon Allbery)
Followup-To: comp.unix.wizards
Organization: Tridelta Industries, Inc., Mentor, OH
Lines: 29

Quoted from <165@hqda-ai.UUCP> ["Re: Zombies ???"], by merlin@hqda-ai.UUCP (David S. Hayes)...
(after comments about ZOMBIE procs not being reclaimed by init under 4.2)
+---------------
| The preceding was discovered on a VAX running 4.2BSD, as a result
| of some problem with emacs.  I think Sys V runs the same way, but
| I can't be sure, as I don't have a Sys V machine.
+---------------

From what I have observed of its behavior, sys5 init spends most of its time
in wait().  When wait() returns, it checks the pid against its internal
table as loaded from /etc/inittab; if it's not found it ignores it, otherwise
it updates /etc/utmp and /etc/wtmp with the exit/termination status and does
whatever the "command" field says (respawn, once = don't respawn, etc.).  In
any case, sys5 has only the standard wait(), rather than multi-optioned and
unknown to me wait3(); as a result, when wait() returns, the zombie is gone.
(Maybe BSD init is using a wait3() option to keep the zombie around after
getting the exit status, then forgetting to issue another wait3() to clean
it up afterward?  --if wait3() can be made to work this way.  How would I
know?  The one BSD system I have access to lacks man pages [grrr].)

++Brandon
-- 
``for is he not of the Children of Luthien?  Never shall that line fail, though
the years may lengthen beyond count.''  --J. R. R. Tolkien

Brandon S. Allbery	           UUCP: cbatt!cwruecmp!ncoast!tdi2!brandon
Tridelta Industries, Inc.         CSNET: ncoast!allbery@Case
7350 Corporate Blvd.	       INTERNET: ncoast!allbery%Case.CSNET@relay.CS.NET
Mentor, Ohio 44060		  PHONE: +1 216 255 1080 (home) +1 216 974 9210