On Thu, Jan 16, 2003 at 09:30:02AM +1300, Zane Gilmore wrote:
> There are also processes that become what are called zombies.
> That is when their parent process dies and they are left running.
A process becomes a zombie when it dies. It stays in the zombie state
until the parent process calls one of the wait() family of calls
(wait(), waitpid(), etc.) on the child and receives the child's exit
status.
> These are impossible to remove without a reboot.
No. The parent process needs to call wait() on the zombie child to
receive its exit status, then the zombie is cleaned up by the kernel.
If the parent dies, the child is reparented to init, which will wait()
on the reparented child and thus cause it to be cleaned up by the
kernel.
> (Linux's dirty little secret :-)
There's nothing dirty or secret about it. It's by design.
Processes that are hung in D state are unkillable without divine
intervention, or a reboot. D is an uninterruptible wait, a process hung
in this state can be caused by a kernel bug, a hardware failure, or
otherwise being hung inside the kernel (think of NFS mounts).
Cheers,
-mjg
--
Matthew Gregan |/
/| [EMAIL PROTECTED]