On Mon, Jan 17, 2005 at 04:00:58PM +0530, Rajendra Prasad Murakonda wrote:
On Mon, 17 Jan 2005, Vinayak Hegde wrote:
You need to fix the badly written application. Fix the disease and not the symptom.
I disagree with you. Its not that if an application is resulting in a zombie process, its a bad application. As far as I remember zombies are used for accounting purposes etc. Child process want parent to note down some information about the child before it dies, so it enters zombie state by leaving a record containing an exit code and some statistics for its parent to collect. The parent on the exit, notes down the info and send a signal to the init so that it will remove the zombie entry in the process table.
The parent is supposed to use the wait() or waitpid() call. I'm not sure if there's another way to reap the child processes.
I think one of the ways to kill zombie is to kill the parent process.
And when the parent is init, as often happens?
(To original poster: use ps -axf to see if you can find the zombie's parent process. If it's init, you may have a problem. If it's something else, try killing that.)