Re: Killing Zombie process!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23Oct2007 03:53, smitha rao <smitharao1980@xxxxxxxxx> 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 <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Hit the button Chewie!  - Han Solo

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux