27

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?

muru
  • 193,181
  • 53
  • 473
  • 722
Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707

2 Answers2

23

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 with SIGCONT, 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 this question on Quora about SIGINT, SIGTERM, SIGKILL and SIGSTOP signals for a good explanation on all of the kill/quit/shutdown signals and their differences.

Source code highlight

Elijah Lynn
  • 3,738
  • 3
  • 27
  • 40
15

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!

roadmr
  • 33,892
  • 9
  • 80
  • 93
  • 8
    SIGTERM is the "polite" way to close a program, which is what "End Process" sends. http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html – Rick Sep 21 '15 at 17:13
  • 1
    So is it `SIGTERM` or `SIGQUIT`? – BenMorel Oct 16 '20 at 12:54