Scott is happily using linux on the desktop now... which is great. Everyone should do that.. Particularly those without any grey hair -- RedHat can take care of that problem quickly!
His entry from today brought out one of my minor linux-user-related pet-peeves. (One of very, very many, I assure you, but I don't really have the time nor the inclination to iterate through that list today.. not to mention I don't really mean to bore my readers to tears).
I'm sure everyone (really, I'm sure) who uses linux (unix, etc) on semi-regular or even occasional basis has used the
kill -9
.. command. You have? Stop it!
No, really.. it's bad. 9 is probably the most mis-used over-used and abused kill signal of them all.. Browser hangs? Kill -9 it, right! See? It's even a verb.
Why is it bad? Its translation into human language is essentially "kill with extreme prejudice".. which nine out of ten times is actually not necessary at all and a simple
kill -TERM
would suffice so the poor, abused application can do any post-processing it may need before moving into the underworld.. Using -TERM (or really just kill as it's the same thing) allows the program to do anything it needs before going away.. like cleaning up temporary files, removing stale file locks and other nastiness that can be avoided.
So repeat after me.. -9 bad.. TERM good.
TrackBack URL for this entry: http://www.unix-girl.com/mt/mt-tb.cgi/701
Grey hair? Is this in reference to age or the grey hair that forms as a result of using *indows? I know guys in their early 30's with grey hair :)
#I have never used kill -9. Man pages rule...
#I have a hotkey combo bound to xkill.
If something locks up, I simply type ctrl-alt-x and my cursor turns into a crosshairs, then I just click on the offending window.
Very cool, and saves faffing about working out the name of the program.
Also, agree on kill -9. It's very rarely necessary.
About as annoying as when you see someone running make as root when installing stuff.
i've never used kill -9 but i do use kill (PID) after running ps. is this the same thing as 'kill -9'?
#Wouldn't it be "-9 bad -15 good"
#Grey hair? I'm beginning to feel personally targetted by this web site...
#Kill -1 (HUP) is also a good choice: this simulates a hangup, and lots of software is designed to deal with the case of an entire login session disappearing. Try HUP first.
#Yeah, kill -9 can have nasty consequences... Like getting the PID wrong and putting "kill -9 1"...
#I use kill -9 *only* if sending a TERM doesn't work.
#KILLER! A true UNIX Geek would know you never NEVER hit anything harder then it takes to get the job done! Kill -HUP usually gets rid of the smaller junk. GreatBLOG! :)
#Yeah, why bother with kill -9 on a single process when you can just kill init and dispense with the pretense of neatly ending a process with a sledgehammer.
BTW, killing single processes when you know what the problematic app is can be much simpler:
ps aux | grep problematic_app
then you can nail 'em all in a single line afterward. Grep is not the fastest thing in the world but it can be your friend.
#Kill -9 means never having to check to see what you wanted to die actually did so. Call me lazy, or untrusting... but after a dozen or more years of dealing with in *nix, those extra ps -ef/aux | greps add up. I'd rather get an extra night of sleep before I die.
#Nyuk nyuk... I can't believe you have not lived long enough yet to find a process you could not kill even with a -9.. Uhhh.. you bettah check anyhoos... Doncha luv thems!
ipcs! ;)
#Skimming a few weblogs I haven't read in a little while and finding too much good stuff: Kasia has a
(read more)
May 19, 2003 12:42 AM