tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Solaris 8 Intel - won't use my PS/2 mouse

PS1 ▻

kill -9 in script

In article <slrn8es72g.kah.James@linux.home>,
James Stevenson <mistral@stevenson.zetnet.co.uk> wrote:
>kill -9
>does not always work

True, but in that case there is nothing that will kill the process.

These days, I tend to use the sequence -15, -1, -2, -9 (TERM, HUP, INT,
KILL).  If you're going to the trouble of writing a kill script, you
might as well do it properly, and put in the extra logic to try one or
two of the catchable signals before going in for the KILL.

>i think the only case is if the process is in an unitrubble sleep
>shows up as "D" in ps and top

Yes.  Once upon a time, this could only happen if there was a hardware
problem with one of your disks: in BSD at least, only I/O to a disk
device causes a process to sleep() at a priority where signals are not
posted.  Then along came NFS... :-(

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell,comp.unix.admin
Subject: Re: kill -9 in script
Date: 13 Apr 2000 09:34:17 +0100
Message-ID: <8d40qv$8lu$1@ltpcg.star.le.ac.uk>
References: <38ED6B3C.7C30B95E@DIEspammer.earthlink.net>
  <w0oH4.50$Nc4.1878@burlma1-snr2> <slrn8es72g.kah.James@linux.home>

△ comp.unix.shell △

◅ Solaris 8 Intel - won't use my PS/2 mouse

PS1 ▻