>What is a zombie process and how do I get rid of it?

A parent process may, at some point in its lifetime, spawn a child process
that does some work. Eventually, the child exits, and returns a status code
to the parent, as an indication of success/failure/whatever.

Now, in order for that status code to be picked up, the parent has to wait
on the child. If it completely ignores the child, the child will try to die,
but will be unable to do so completely, because it is duty-bound to report
its status code back to the parent. So it will enter this quasi-dead state,
affectionately known as a zombie. Its file descriptors have gone, its memory
has been recycled... it has vanished, except as a line in the process table.

Now, there is very little chance that you will be able to prod the parent
into  performing a wait on the child, so tbe usual strategy is to kill the
parent. 

Do a ps, locate the PPID (parent process id) column, to get the pid of the
parent of the zombie. Now identify the parent, by matching up that PPID
number with a process having that number in the PID column.

If it's something like cron, sendmail or some other regular daemon, you
should shut it down cleanly using the corresponding /etc/rc.d/init.d/
script. Otherwise just hold your breath, kill -9 <the-pid> and see if
anything funny happens (maybe save your files beforehand, ok?)

If you really don't know whether you should kill the process, you can leave
it alone. Zombies really don't do a lot of harm.

DL
--
Well, I would -- if they realized that we -- again if -- if we led them back
to that stalemate only because our retaliatory power, our seconds, or strike
at them after our first strike, would be so destructive that they couldn't
afford it, that would hold them off.
                                         -- Ronald Reagan, on the MX missile


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to