union wait wstat;
pid_t pid;
while(1)
{
pid = wait3(&wstat,WNOHANG,(struct rusage *)NULL);
if(pid == 0 )
return;
else if(pid == -1)
return;
else
{
fprintf(stderr,"\nProcess with PID : %d exited with return value: %d\n",pid,wstat.w_retcode);
deleteJob(pid);
}
}
我正在尝试在unix shell上使用等待联合,但我无法使用它,因为我遇到了错误wait' isn't known
warning: implicit declaration of function
wait3']的存储大小
工会等待wstat; pid_t pid; while(1){pid = wait3(&wstat,WNOHANG,(struct rusage *)NULL); if(pid == 0)返回;其他...
您应添加以下包含文件: