mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-07 06:56:56 +01: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11099
@ -172,7 +172,9 @@ reapchild(signo)
|
|||||||
int signo;
|
int signo;
|
||||||
{
|
{
|
||||||
|
|
||||||
while (wait3(NULL, WNOHANG, NULL));
|
while (wait3(NULL, WNOHANG, NULL) > 0) {
|
||||||
|
/* nothing */
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user