使用kill(pid,SIGTERM)之后我无法让我的程序sleep()我该怎么办?
我正在使用的代码:
kill(PID_of_Process_to_be_killed,SIGTERM);
sleep(5); --> this is not working
sleep(5); --> this is working
Run Code Online (Sandbox Code Playgroud)
现在的解决方案是:
kill(PID_of_Process_to_be_killed,SIGTERM);
sleep(sleep(5));
Run Code Online (Sandbox Code Playgroud)
但为什么杀死后第一次睡觉回归0?