Page MenuHomeFreeBSD

D59307.diff
No OneTemporary

D59307.diff

diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -727,10 +727,9 @@
}
/*
- * Syslogd will not reap its children via wait().
- * When SIGCHLD is ignored, zombie processes are
- * not created. A child's PID will be recycled
- * upon its exit.
+ * Pipe processes are spawned with pdfork(2) and PD_NOWAITPID, so
+ * they are reaped when their process descriptor is closed.
+ * Ignore SIGCHLD so that no signal is delivered for them.
*/
act.sa_handler = SIG_IGN;
for (size_t i = 0; i < nitems(sigcatch); ++i) {
@@ -3781,7 +3780,7 @@
if (pipe(pfd) == -1)
return (-1);
- switch ((pid = pdfork(&pd, PD_CLOEXEC))) {
+ switch ((pid = pdfork(&pd, PD_CLOEXEC | PD_NOWAITPID))) {
case -1:
return (-1);

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 4, 8:33 AM (14 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37970211
Default Alt Text
D59307.diff (812 B)

Event Timeline