mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
b3c66dae6f
commit
373efd489b
1 changed files with 3 additions and 1 deletions
|
|
@ -172,7 +172,9 @@ reapchild(signo)
|
|||
int signo;
|
||||
{
|
||||
|
||||
while (wait3(NULL, WNOHANG, NULL));
|
||||
while (wait3(NULL, WNOHANG, NULL) > 0) {
|
||||
/* nothing */
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue