Page MenuHomeFreeBSD

syslogd: Terminate pipe processes gracefully
ClosedPublic

Authored by jfree on Dec 23 2025, 2:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 5, 9:23 AM
Unknown Object (File)
Sat, Apr 4, 4:15 AM
Unknown Object (File)
Sun, Mar 22, 9:35 PM
Unknown Object (File)
Thu, Mar 19, 2:38 AM
Unknown Object (File)
Mar 9 2026, 1:46 PM
Unknown Object (File)
Feb 24 2026, 11:27 PM
Unknown Object (File)
Feb 23 2026, 8:00 PM
Unknown Object (File)
Feb 10 2026, 1:14 PM
Subscribers

Details

Summary

Pipe actions spawn processes based on the command provided in the
syslogd configuration file. When a HUP signal is received, enter
these processes into the deadq instead of immediately killing them.
This matches the behavior of syslogd prior to it being Capsicumized.

Fixes: d2d180fb7736

Test Plan

Using test provided by bug report:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291557

$ logger -p local2.warning -t logger message1
$ killall -1 syslogd
$ logger -p local2.warning -t logger message2
$ killall -1 syslogd

$ tail /var/log/messages
Dec 22 06:44:54 CURRENT logger[6027]: message1
Dec 22 06:44:55 CURRENT pipe-test[6032]: 6028 START
Dec 22 06:44:55 CURRENT pipe-test[6036]: 6028 Dec 22 06:44:54 CURRENT logger[6027]: message1
Dec 22 06:44:56 CURRENT pipe-test[6041]: 6028 END
Dec 22 06:44:59 CURRENT logger[6045]: message2
Dec 22 06:44:59 CURRENT pipe-test[6050]: 6046 START
Dec 22 06:44:59 CURRENT pipe-test[6054]: 6046 Dec 22 06:44:59 CURRENT logger[6045]: message2
Dec 22 06:45:02 CURRENT pipe-test[6061]: 6046 END

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69445
Build 66328: arc lint + arc unit

Event Timeline

jfree requested review of this revision.Dec 23 2025, 2:55 AM

Is it possible to convert the test scenario into a regression test case?

This revision is now accepted and ready to land.Jan 5 2026, 3:25 PM
jfree retitled this revision from syslogd: Do not immediately terminate piped processes on restart to syslogd: Terminate pipe processes gracefully.Jan 12 2026, 3:41 AM

Tests added. I forgot to add the review link into the commit message... oops. Closing this.