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)
Tue, Feb 10, 1:14 PM
Unknown Object (File)
Wed, Jan 28, 2:52 AM
Unknown Object (File)
Jan 19 2026, 10:44 PM
Unknown Object (File)
Jan 16 2026, 12:25 PM
Unknown Object (File)
Jan 13 2026, 10:27 PM
Unknown Object (File)
Jan 12 2026, 11:04 AM
Unknown Object (File)
Jan 10 2026, 3:39 PM
Unknown Object (File)
Jan 8 2026, 6:42 AM
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.