Catch the case where the children can die too soon causing wait3()

to return ECHILD, which causes the while loop to run forever.
(eg: when accidently running nfsiod on a slow system with a kernel
 without NFS support...)
Obtained from: NetBSD; Frank van den Linden <frank@struis.fwi.uva.nl>
This commit is contained in:
Peter Wemm 1995-10-01 03:23:13 +00:00
parent b3c66dae6f
commit 373efd489b

View File

@ -172,7 +172,9 @@ reapchild(signo)
int signo;
{
while (wait3(NULL, WNOHANG, NULL));
while (wait3(NULL, WNOHANG, NULL) > 0) {
/* nothing */
};
}
void