Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/dist/libntp PR/50048: Martin Husemann: Avoi...
details: https://anonhg.NetBSD.org/src/rev/4345b6d3ae66
branches: trunk
changeset: 809510:4345b6d3ae66
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 17 15:17:07 2015 +0000
description:
PR/50048: Martin Husemann: Avoid reaping the child twice by setting c->pid = 0
after the wait.
diffstat:
external/bsd/ntp/dist/libntp/work_fork.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r f7281e3e818f -r 4345b6d3ae66 external/bsd/ntp/dist/libntp/work_fork.c
--- a/external/bsd/ntp/dist/libntp/work_fork.c Fri Jul 17 08:30:33 2015 +0000
+++ b/external/bsd/ntp/dist/libntp/work_fork.c Fri Jul 17 15:17:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: work_fork.c,v 1.5 2015/07/10 14:20:32 christos Exp $ */
+/* $NetBSD: work_fork.c,v 1.6 2015/07/17 15:17:07 christos Exp $ */
/*
* work_fork.c - fork implementation for blocking worker child.
@@ -128,6 +128,7 @@
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);
+ c->pid = 0;
}
}
@@ -164,7 +165,6 @@
close(c->resp_read_pipe);
c->resp_read_pipe = -1;
}
- c->pid = 0;
c->resp_read_ctx = NULL;
DEBUG_INSIST(-1 == c->req_read_pipe);
DEBUG_INSIST(-1 == c->resp_write_pipe);
Home |
Main Index |
Thread Index |
Old Index