LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] The correct way to kill processes

[ILUG] The correct way to kill processes

Ciaran Johnston cj at nologic.org
Tue Jul 12 23:52:54 IST 2005


Conall O'Brien wrote:

>On Tue, Jul 12, 2005 at 06:17:23PM IST, Gareth Eason 
><bigbro at skynet.ie> incoherently babbled:
>
>  
>
>>To kill a process (in increasing order of impoliteness):
>>	1. use the proscribed method (man page / interface)
>>	2. If it has an interface, try Ctrl + C (break)
>>	3. kill -TERM $PID
>>	4. kill -9 $PID
>>	5. shutdown -t 0 -r now  (or similar, to reboot your machine)
>>    
>>
>
>That doesn't look complete, or in the right order for that matter...
>
>
>I'd add "kill -STOP $PID" between 2 and 3.
>  
>
This will do what it says on the tin, and STOP the process. It won't 
actually terminate it, which is I believe the desired effect. It's a 
valid option to kill but really belongs before 1, since you can change 
your mind with this one and restart the same process by sending a kill 
-CONT. You need to do more to get rid of the process altogether.

>
>Also, kill -TERM is the same thing as kill -15, which should be
>performed *after* kill -9, not before. So 3 and 4 should be swapped.   
>  
>
That's just wrong. kill -9 is unequivocal. kill -15 (the default) will 
allow the process to clean up before exiting, or ignore it altogether. 
Which of these is more polite?

/Ciaran.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell