0

Please explain the difference of above them. "kill -0" and "kill -9"

1 Answers1

1

https://unix.stackexchange.com/a/169899/55635

kill(1)

$ man 1 kill
...
If sig is 0, then no signal is sent, but error checking is still performed.
...

kill(2)

$ man 2 kill
...
If sig is 0, then no signal is sent, but error checking is still performed; 
this can be used to check for the existence of a process ID or process 
group ID.
...

So signal 0 will not actually in fact send anything to your process's PID, but will in fact check whether you have permissions to do so.

While kill -9 - actually sends SIGKILL to PID

Community
  • 1
  • 1
Samuel
  • 3,631
  • 5
  • 37
  • 71