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

RE: [cobalt-users] Kill



From: V. Peter Stulginskis [mailto:vps@xxxxxxxxxxxxxx]
Sent: Thursday, May 25, 2000 12:31 AM
[kill will not leave junk lying about]
> For most cases this is correct.  Any flavor of UNIX does not have the
> difficulty with memory mapping as a dos/win PC.  However, 
> occasionally when killing a processes you can create an "ORPHAN" process
> that you have no means of accessing and does consume resources.  In 
> that case the only way to clear an orphan is by rebooting.

Zombie processes (often listed in ps as <defunct>) occur when the child is
killed but the parent is not cleaning up after them, as a parent must at a
minimum accept the SIGCHLD signal when their child exits. All processes must
have a parent owner, except one: init. Init is special in that it always has
a pid of 1, and most processes that could be thought of as "detached" are
actually children of init.

When the parent of a zombie process exits, the zombie process must still
have a parent, so the kernel will re-parent it to init. Init always accepts
any SIGCHLDs waiting, so the net effect is that when the zombie's parent
exits, the zombie is cleaned up by init. 

So you _don't_ need to reboot to clean up zombie processes, just kill the
parent. Unix is not an OS you should need to reboot _ever_ for non-hardware
problems. Rebooting has become the defacto way to solve problems for many
systems, and is unfairly applied to Unix boxen as well. 

-- 
David Zanetti, Unix Systems Administrator and Postmaster
Wellington City Council, New Zealand. Phone +64-4-801-3354
The light at the end of the tunnel is a train heading for you.