"kill -0" 和 "kill -9" 有什么区别?
What is the difference between "kill -0" and "kill -9"?
请说明以上两者的区别。 "kill -0" 和 "kill -9"
https://unix.stackexchange.com/a/169899/55635
杀死(1)
$ man 1 kill
...
If sig is 0, then no signal is sent, but error checking is still performed.
...
杀死(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.
...
所以信号 0 实际上不会向您的进程的 PID 发送任何内容,但实际上会检查您是否有权这样做。
虽然 kill -9
- 实际上发送 SIGKILL 到 PID
请说明以上两者的区别。 "kill -0" 和 "kill -9"
https://unix.stackexchange.com/a/169899/55635
杀死(1)
$ man 1 kill
...
If sig is 0, then no signal is sent, but error checking is still performed.
...
杀死(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.
...
所以信号 0 实际上不会向您的进程的 PID 发送任何内容,但实际上会检查您是否有权这样做。
虽然 kill -9
- 实际上发送 SIGKILL 到 PID