Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170043482
D59307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
812 B
Referenced Files
None
Subscribers
None
D59307.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D59307: syslogd: do not turn pipe exec process into zombies
Attached
Detach File
Event Timeline
Log In to Comment