[TriLUG] silly kill question

Robert Ryals rryals at tmio.com
Fri Oct 8 07:43:11 EDT 2004


Brian Henning wrote:

>Also, note that 'ps' only shows processes running for the current user.  Use
>'ps -e' to show ALL processes.  You'll likely have to pipe it through less
>if it's a very heavily loaded system.
>
>There are also two separate signals often used to end processes, SIGKILL
>(-9) and SIGTERM (-15).  Try both, like this:
>
>kill -9 _pid_
>kill -15 _pid_
>or
>killall -9 _process_name_
>killall -15 _process_name_
>
>I've often seen the default signal (I forget which it is...  I never depend
>on it anymore) fail to terminate a misbehaving process.
>
>Hope this is helpful.
>
>~Brian
>  
>
SIGTERM is the preferred way to tell a process to end, it allows the 
process to perform any cleanup that may need to be done before exiting 
(like removing temporary files). This method may not always terminate 
the process though. If that does not work then SIGKILL tells the OS to 
kill the process no matter what - the process is abruptly halted no 
matter what it is doing (although I've seen  some hardware problems 
where this did not stop the process either).

Robert




More information about the TriLUG mailing list