Page MenuHomeFreeBSD

syslogd: Use pipe to communicate with daemon
ClosedPublic

Authored by jfree on Aug 14 2023, 11:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 5:24 AM
Unknown Object (File)
Mon, Oct 21, 5:24 AM
Unknown Object (File)
Mon, Oct 21, 5:24 AM
Unknown Object (File)
Mon, Oct 21, 3:40 AM
Unknown Object (File)
Mon, Oct 21, 3:40 AM
Unknown Object (File)
Mon, Oct 21, 3:40 AM
Unknown Object (File)
Mon, Oct 21, 3:40 AM
Unknown Object (File)
Fri, Oct 18, 11:00 PM
Subscribers

Details

Summary
Previously, syslogd's daemon process would signal that it had finished
initialization using SIGALRM. In capability mode, signal delivery is not
allowed, so use a pipe to indicate that it is ready to accept messages.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jfree edited the summary of this revision. (Show Details)

Remove ts and tsp variables altogether (see updated patch summary)

jfree edited the summary of this revision. (Show Details)

Fix conflicts after rebase. The previous revision has been squashed into a patch earlier in the stack.

Call die() instead of err() in waitdaemon when an error occurs so the pidfile is removed.

markj added inline comments.
usr.sbin/syslogd/syslogd.c
816–818

Since you're changing this line anyway.

867

This should be commented, since it's rather unclear what's happening here. That is, something like, "Signal our parent to let them know that we've finished initializing."

This revision is now accepted and ready to land.Aug 23 2023, 2:49 PM
This revision now requires review to proceed.Aug 23 2023, 10:12 PM
This revision is now accepted and ready to land.Aug 24 2023, 2:12 PM
This revision was automatically updated to reflect the committed changes.