Please explain the difference of above them. "kill -0" and "kill -9"
Asked
Active
Viewed 1,122 times
0
-
1I'm voting to close this question as off-topic because `man kill` and `google man kill signal` is there too. – Marcin Orlowski Apr 06 '16 at 07:34
-
`man kill` on my system does not say what signal 0 does. – Thilo Apr 06 '16 at 07:38
-
http://unix.stackexchange.com/questions/169898/what-does-kill-0-do – Thilo Apr 06 '16 at 07:39
1 Answers
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