POSIX.1-2001 allows a parent process to elect for the kernel to automatically reap child processes that terminate by setting the disposition of SIGCHLD to SIG_IGN (which is the default) or by setting the SA_NOCLDWAIT flag for the SIGCHLD signal。
如果这样,sigchld处理返回后子进程就木有了,然后waitpid通过子进程的pid能找到啥?所以出错,错误码ECHILD。作者: lanying_wzw 时间: 2012-04-13 18:02 回复 6# 鸡丝拌面