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

Re: Unkillable process



on Wed, May 23, 2001 at 11:33:45AM +0700, Oki DZ (okidz@bdg.pindad.com) wrote:
> "Karsten M. Self" wrote:
> > I usually try to track down process relationships with 'pstree', then
> > try killing related process with 15, 1, 2, and, if all else fails, 9.
> 
> killall -9 <program name> would be much more efficient, right?

Using kill -9 on a process means you may have to clean up the pieces.
Signals 15, 1, and 2 (TERM, HUP, and INT), are generally considered to
be polite requests to jobs to get the hell over it already, but to clean
up on the way out.  SIGKILL is nonmaskable, and a process *can't*
perform cleanup or garbage collection even if it wants to.

> > True unkillable zombies are rather rare.
> 
> Usually, it's pretty difficult; even though they are already
> half-dead.

Most zombies are waiting for a resource to close.  Hitting the other end
of the resource (parent or child) generally does same.

> BTW, speaking about killing processes...
> Once I had a daemon that couldn't be killed because the client program
> that once connected to it didn't close the ports properly. So the daemon
> was just there sitting, waiting for a time-out. But it didn't happen.
> Magically, kill -9 didn't work; the daemon materialized as a zombie, yet
> it was a strong one.

This is a case where you may have to shut down.  Sometimes you can get
the buggers if you shoot at 'em enough ways though.

> It was pretty amusing... how long would a TCP connection time out given
> that any other side doesn't close the connection (and none is reading
> the ports)? Or, it just simply wouldn't time out?
> 
> Oki

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org
   Disclaimer:          http://www.goldmark.org/jeff/stupid-disclaimers/

Attachment: pgpqYhIrzKfOt.pgp
Description: PGP signature


Reply to: