Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I want to kill a process via System Monitor I am presented with 2 quick ways, Kill Process and End Process. What is the difference between these two?

share|improve this question
up vote 5 down vote accepted

Per the System Monitor manual, you should normally use "End Process", and only if that fails use "Kill Process":

You usually terminate a process only if you cannot end the process normally as described in To End a Process.

On a technical level this makes me think that End Process sends a SIGQUIT, which allows the process to trap and perform cleanup if needed, but if that fails, Kill Process should send a SIGKILL which should violently terminate the process, without chance of recovery. Use sparingly!

share|improve this answer
5  
SIGTERM is the "polite" way to close a program, which is what "End Process" sends. gnu.org/software/libc/manual/html_node/Termination-Signals.html – Rick Sep 21 '15 at 17:13

I was curious too, so I just browsed through the source code and found the below in application.cpp. There is more to this code but I think these correlate to the options, at least for System Monitor 3.8.2.1 through 3.19.3:

  • Stop Process = SIGSTOP (pause signal, let's you continue later, does not kill process)
  • End Process = SIGTERM (termination signal, the right way, the application can intercept this signal and intiate shutdown tasks such as temp file cleanup)
  • Kill Process = SIGKILL (kill signal, extreme, only use if SIGTERM doesn't work, won't intiate shutdown tasks)

See https://www.quora.com/What-is-the-difference-between-the-SIGINT-and-SIGTERM-signals-in-Linux for a good explanation on all of the kill/quit/shutdown signals and their differences.

Source code highlight

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.