我无法让我的程序在使用kill(pid,SIGTERM)后休眠()。 我该怎么做?
我正在使用的代码:
kill(PID_of_Process_to_be_killed,SIGTERM);
sleep(5); --> this is not working
sleep(5); --> this is working
目前的解决方案是:
kill(PID_of_Process_to_be_killed,SIGTERM);
sleep(sleep(5));
但为什么 kill 后第一次 sleep 返回 0 呢?