Saturday, May 4, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1237  / 3 Years ago, sat, june 12, 2021, 3:24:08

When I shutdown my minecraft it never closes all the way, I have looked for a solution but found none. After awhile I gave up and decided that I would manually kill it when I wanted to close it.



If I use pgrep then kill in the terminal it seems to have no affect, but when I open the system monitor and right click and kill it, it shuts down nicely.



What are the differences between the System Monitor way and the Terminal way? Does the System Monitor do something else in the background that the kill command does not?


More From » command-line

 Answers
4

There is no difference between the kill command and the System Monitor's 'kill'. The System Monitor just gives some arguments to kill that I assume you don't know.



When you kill <process-number>, it's actually sending a signal to that process to cleanly exit. This is called a SIGTERM. In order to kill a process unconditionally, potentially causing data loss, you need to send a different signal:



kill -9 <process-number>


This sends a SIGKILL to the process, which immediately ends its execution. System Monitor uses kill -9 when you ask to 'kill' a process rather than simply 'close' it.



This answer on the SuperUser Stack Exchange should be of help.


[#42498] Sunday, June 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feeous

Total Points: 102
Total Questions: 122
Total Answers: 119

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
;