Wiki‎ > ‎

Linux Kill Command

posted Dec 24, 2015, 10:30 AM by Dong Xu
Generally, you should use kill -15 before kill -9 to give the target process a chance to clean up after itself. (Processes can't catch or ignore SIGKILL, but they can and often do catch SIGTERM.) If you don't give the process a chance to finish what it's doing and clean up, it may leave corrupted files (or other state) around that it won't be able to understand once restarted.

the compelling reason is that if you get in the habit of sending SIGKILL, then when you get to a program which will, for example, corrupt an important database for you or your company, you'll really regret it. kill -9 has its use, as a last-resort terminator, emphasis on last-resort; admins that use it before the last-resort a) do not understand being an admin too well, and b) shouldn't be on a production system.

Reference: http://superuser.com/questions/107543/bash-man-page-kill-pid-vs-kill-9-pid

http://unix.stackexchange.com/questions/8916/when-should-i-not-kill-9-a-process
Comments