Module Name:    src
Committed By:   christos
Date:           Mon Jul 20 15:35:00 UTC 2015

Modified Files:
        src/external/bsd/ntp/dist/libntp: work_fork.c

Log Message:
we set SIGCHLD to SIG_IGN so we are not going to generate zombies so it
will be an error to wait.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/ntp/dist/libntp/work_fork.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/libntp/work_fork.c
diff -u src/external/bsd/ntp/dist/libntp/work_fork.c:1.6 src/external/bsd/ntp/dist/libntp/work_fork.c:1.7
--- src/external/bsd/ntp/dist/libntp/work_fork.c:1.6	Fri Jul 17 11:17:07 2015
+++ src/external/bsd/ntp/dist/libntp/work_fork.c	Mon Jul 20 11:35:00 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: work_fork.c,v 1.6 2015/07/17 15:17:07 christos Exp $	*/
+/*	$NetBSD: work_fork.c,v 1.7 2015/07/20 15:35:00 christos Exp $	*/
 
 /*
  * work_fork.c - fork implementation for blocking worker child.
@@ -127,7 +127,13 @@ harvest_child_status(
 		/* Wait on the child so it can finish terminating */
 		if (waitpid(c->pid, NULL, 0) == c->pid)
 			TRACE(4, ("harvested child %d\n", c->pid));
-		else msyslog(LOG_ERR, "error waiting on child %d: %m", c->pid);
+		else if (errno != ECHILD) {
+			/*
+			 * SIG_IGN on SIGCHLD on some os's means do not wait
+			 * but reap automaticallyi
+			 */
+			msyslog(LOG_ERR, "error waiting on child %d: %m", c->pid);
+		}
 		c->pid = 0;
 	}
 }

Reply via email to