Newsgroups: comp.unix.questions Path: utzoo!utgpu!jmason2 From: jmason2@gpu.utcs.utoronto.ca (Jamie Mason) Subject: Re: Zombie processes Message-ID: <1991Jun19.035814.1580@gpu.utcs.utoronto.ca> Summary: You can't flog a dead horse. (ummm process) Keywords: kill, wait, zombie Organization: University of Toronto Computer Services Advisor References: <1991Jun19.103710.3404@fennel.cc.uwa.oz.au> Date: Wed, 19 Jun 1991 03:58:14 GMT In article <1991Jun19.103710.3404@fennel.cc.uwa.oz.au> epidem@fennel.cc.uwa.oz.au writes: >Can anyone tell us how to kill a ZOMBIE process under >SunOS 4.0.3. Can anyone tell us how to kill a VAMPIRE 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 (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