On Tue, 20 Mar 2007 13:17:52 -0500
M Harris <[EMAIL PROTECTED]> wrote:

> On Tuesday 20 March 2007 12:37, Randall R Schulz wrote:
> > >       kill -9 <PID>
> >
> > Absolutely a bad idea. Many programs have clean-up operations to
> > perform. This guarantees those clean-up actions will not take place.
> >
> > Signal TERM or 15 is the clean way to kill a process. Only resort to
> > KILL or 9 when TERM does not cause the process to terminate.
>       Yup, except that what we are talking about here is a process that won't 
> die...  kill -9 <PID> is the ONLY way to get it to happen.
> 
>       Another way to say this is that if SIGTERM will kill the process then 
> you 
> probably didn't need to be in an xterm window running the kill command in the 
> first place. The usual reason for a process to "refuse to die" is that it is 
> no longer correctly performing signal handling, so giving it the SIGTERM is 
> useless. 
>       
>       kill -9 <PID> is the only way to go in these situations.
The difference is that SIGTERM is a catchable signal, and should
generally be tried first because the process can clean itself up. If
that does not work, then by all means use SIGKILL (-9) as it is not
catchable by the process. 

-- 
Jerry Feldman <[EMAIL PROTECTED]>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

Attachment: signature.asc
Description: PGP signature

Reply via email to