Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Killing Zombie process!

From: Cameron Simpson <cs(at)zip.com.au>
Date: Mon Oct 22 2007 - 19:04:57 EDT


On 23Oct2007 03:53, smitha rao <smitharao1980@gmail.com> wrote:
| I was wondering if i can kill all the zombie process in my server in one
| shot.

You can't kill zombies - they are already dead. That may sound like humour, but it is also the literal truth - that's why zombie processes are called zombies.

A zombie is a child process which has exited, but not been waited for by its parent process - a formal action involving the wait() system call. A zombies process is _nothing_ more than a slot in the process table kept around to store the exit status of the child when the parent process gets around to calling wait(). Since it's just a process slot, you do not need to worry about them consuming resources - you need tens of thousands of these to exhaust your process table. Their main downside is filling ps listings with noise, but ps listings are rarely needed in real life.

Seeing a lot of zombies is normally an indication of loose programming practices by the author of the parent process. A lot of careless xinitrc/xsession scripts have this flaw, but they are not alone.

A zombie will _only_ go away when its parent process calls wait(), obtaining the exit status and freeing the process slot. If the parent exits, the zombie is inherited by process 1 (init), which will wait() for the zombie and clean it up.

If all the zombies are children of a single parent, killing the parent will cause the zombies to be reaped by process 1. But killing the parent may not be a good thing to do; your call.

Cheers,

-- 
Cameron Simpson  DoD#743
http://www.cskk.ezoshosting.com/cs/

Hit the button Chewie!  - Han Solo

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Received on Mon Oct 22 19:05:11 2007

This archive was generated by hypermail 2.1.8 : Fri May 30 2008 - 14:22:01 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library