kill -0 pid 不发送任何信号,但是系统会进行错误检查。
所以经常用来检查一个进程是否存在,存在返回0;不存在返回1;
If signal is 0, then no actual signal is sent, but error checking is still performed.
kill -0 pid 不发送任何信号,但是系统会进行错误检查。
所以经常用来检查一个进程是否存在,存在返回0;不存在返回1;
If signal is 0, then no actual signal is sent, but error checking is still performed.