[Smaug] Dumb zombie question

Rick Moen rick at linuxmafia.com
Thu, 30 May 2002 19:06:29 -0700

Quoting Paul Thomas (paul@cuenet.com):

> I have some zombie processes that are smarter than I am and
> I don't know how to make them go away without rebooting.

Super-short answer:  "Mu."  ;->

Short answer:  You can't kill a zombie process, mostly.  Fortunately, it
(mostly) doesn't matter.

Long answer:  A zombie process is one that is defunct and in truth isn't
really there anymore, and has terminated and relinquished all machine 
resources, but remains as an entry in the process table because its
parent process is in a wait() state, waiting to hear from it.
Zombie processes are indicated by "Z" in the ps command's status field.
Killing the parent process, if you can identify it and get to it, or
otherwise getting it to stop waiting, will (usually) remove the zombie
child process -- if you care.

The only thing a zombie process hogs is a process-table entry.
Hypothetically, if the process table accumulates huge numbers of defunct
processes, eventually, the kernel will reach its maximum process count,
and misbehave until you reboot.  So, don't worry about a few zombies,
but do worry about thousands of them.

Cheers,   The difference between common sense and paranoia is that common sense
Rick Moen     is thinking everyone is out to get you.  That's normal; they are.
rick@linuxmafia.com      Paranoia is thinking they're conspiring.  -- J. Kegler