Zombies/`exiting' processes (was HELP RE: "<exiting>" processes)
Chris Torek
chris at mimsy.UUCP
Tue Jan 17 01:39:03 AEST 1989
In article <1496 at aucs.UUCP> 850181p at aucs.UUCP (STEVEN E. PARKER) writes:
> I can't seem to kill a process that is stuck in the <exiting>
>status. I tried sure kills etc. nothing seems to work.
You cannot kill zombies, for they are already dead.
`What is a zombie?' I hear you ask. `Why should a dead process stay
around?'
Dead processes stick around principally for two reasons. The lesser of
these is that they provide a sort of `context' for closing open file
descriptors, and shutting down other resources (memory, swap space,
and so forth). This generally happens immediately, and the process
remains only for its major purpose: To hold on to its exit status.
Each process has associated with it a `Parent Process ID'. The parent
PID is the PID of the process that created it via fork(), or, if that
particular process has since vanished, 1 (the PID of /etc/init). The
init program is always waiting, so that if a parent exits, then its
child exits, init collects the child's status and promptly ignores it.
So, to get rid of a zombie, you must wait for it. If you have already
done so, or if the process's PPID is 1, the process is almost certainly
stuck in a driver close routine, and if it remains that way forever,
the driver has a bug.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.questions
mailing list