News for hackers. Stuff that matters.
Re:Learn Enough Command Line to Be Dangerous (Draft) by atbattag on Saturday September 19, 2015 @09:06PM (#10246159)
As already stated, a process cannot respond to KILL signal, not allowing it to cleanup after itself. In many cases this may be OK or irrelevant, but you should never use -9 as a first resort. -9 is a last resort.

Ever kill -9 an unresponsive rails server process only to find that you have to manually rm the tmp server.pid file? That's because you used -9 ;).

Re:Learn Enough Command Line to Be Dangerous (Draft) by mhartl on Saturday September 19, 2015 @10:14PM (#10246327)
So would it be reasonable to recommend kill $pid as a first step and kill -9 $pid if that doesn't work? Bear in mind that this is a tutorial for beginners, so things like kill -15 $pid || kill -2 $pid || kill -1 $pid || kill -9 $pid (as another commenter suggested) aren't appropriate, but I feel like kill is too important a command to leave out completely.
Re:Learn Enough Command Line to Be Dangerous (Draft) by atbattag on Saturday September 19, 2015 @10:44PM (#10246389)
Suggesting kill first before kill -9 seems like a good idea. Like you said kill is an important tool. Like you said this is for beginners so its up to you how much more detail to go into with the command.
Re:Learn Enough Command Line to Be Dangerous (Draft) by mhartl on Saturday September 19, 2015 @11:43PM (#10246496)
Great, thanks for the suggestions.
Re:Learn Enough Command Line to Be Dangerous (Draft) by userbinator on Sunday September 20, 2015 @01:24AM (#10246646)
On the other hand, it seems almost all the times when I've had to use kill it's because the process has already refused to die by more normal means and I doubt it'd respond to a non-9 kill.