summaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-10-01 03:23:13 +0000
committerpeter <peter@FreeBSD.org>1995-10-01 03:23:13 +0000
commiteacdab51aaa06bdf4b9c2517e0f552dbdeebb57a (patch)
tree0199fe2ef6d799c981f443696ca1f2cdac8e1314 /sbin/nfsiod
parenta924a14c485ae721652c62480df0212a1e70f93e (diff)
downloadFreeBSD-src-eacdab51aaa06bdf4b9c2517e0f552dbdeebb57a.zip
FreeBSD-src-eacdab51aaa06bdf4b9c2517e0f552dbdeebb57a.tar.gz
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>
Diffstat (limited to 'sbin/nfsiod')
-rw-r--r--sbin/nfsiod/nfsiod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/nfsiod/nfsiod.c b/sbin/nfsiod/nfsiod.c
index 0a6985f..3100671 100644
--- a/sbin/nfsiod/nfsiod.c
+++ b/sbin/nfsiod/nfsiod.c
@@ -172,7 +172,9 @@ reapchild(signo)
int signo;
{
- while (wait3(NULL, WNOHANG, NULL));
+ while (wait3(NULL, WNOHANG, NULL) > 0) {
+ /* nothing */
+ };
}
void
OpenPOWER on IntegriCloud