aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/nfsiod
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1995-10-01 03:23:13 +0000
committerPeter Wemm <peter@FreeBSD.org>1995-10-01 03:23:13 +0000
commit373efd489b1990db5f33e201c1c38e619fa06e35 (patch)
tree0199fe2ef6d799c981f443696ca1f2cdac8e1314 /sbin/nfsiod
parentb3c66dae6f63ca0f2dea7888d45a6959ca5caa98 (diff)
downloadsrc-373efd489b1990db5f33e201c1c38e619fa06e35.tar.gz
src-373efd489b1990db5f33e201c1c38e619fa06e35.zip
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>
Notes
Notes: svn path=/head/; revision=11099
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 0a6985fad4dd..3100671a06cc 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