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.
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!