Zombie processes

Jamie Mason jmason2 at gpu.utcs.utoronto.ca
Wed Jun 19 13:58:14 AEST 1991


In article <1991Jun19.103710.3404 at fennel.cc.uwa.oz.au> epidem at fennel.cc.uwa.oz.au writes:
>Can anyone tell us  how to kill a ZOMBIE <EXITING> process under
>SunOS 4.0.3.

	Can anyone tell us how to kill a VAMPIRE <UNDEAD> creature under
Transylvania 4.0.3? :-)

	You *can't* kill a zombie process -- it's already dead.  When a
process dies, (either by normally or abonormally), it is not removed from
the process table until its parent has done a wait() for it.  So your
zombie <exiting> (You use TOP, I see) process *is* dead, but it's parent
has not done a wait() for it.  This *may* indicate a bug in the parent,
or perhaps the parent is just stopped.

	So how do you "kill" the zombie (i.e. remove it from the process
table)?  Afterall, this is what you need to do if the parent is off in
never-never land...

	You kill the parent.  Send the parent a TERM or a KILL, whatever
it takes to kill it (gracefully if possible).  When the parent dies,
*it's* parent will wait for it.  Furthermore, any children it had when it
died (orphans) are inherited by the INIT process (pid 1).  INIT will
promptly do a wait() for the zombie process, thus laying it to a peaceful
rest.

	Of course, if INIT has died, then there is not much you can do
about the zombie.  But if INIT has died, the zombie is the *least* of
your problems.  (un)Fortunately, the demise of INIT under SunOS causes a
Kernel panic, rebooting the system.

Jamie  ...  Lurker in the Process Table
Written On  Tuesday, June 18, 1991  at  11:55:31pm EDT



More information about the Comp.unix.questions mailing list