Page MenuHomeFreeBSD

syslogd: Do not open console descriptor
ClosedPublic

Authored by jfree on Aug 8 2023, 4:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 5:26 AM
Unknown Object (File)
Mon, Oct 21, 5:26 AM
Unknown Object (File)
Mon, Oct 21, 5:26 AM
Unknown Object (File)
Mon, Oct 21, 3:36 AM
Unknown Object (File)
Mon, Oct 21, 3:24 AM
Unknown Object (File)
Sat, Oct 19, 12:05 AM
Unknown Object (File)
Sat, Oct 19, 12:05 AM
Unknown Object (File)
Sat, Oct 19, 12:05 AM
Subscribers

Details

Summary
Setup consfile filed for logging while Initialized is false, but do not
bother opening the console. Close console/tty descriptors after parsing,
as well. The ttymsg() function will re-open these descriptors for us.

Also, remove references to the ctty global variable since it will always
be _PATH_CONSOLE.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Aug 11 2023, 3:04 PM
This revision now requires review to proceed.Aug 12 2023, 3:49 AM
This revision is now accepted and ready to land.Aug 14 2023, 2:25 PM

Move consfile setup before waitdaemon() to align with nulldesc ordering in https://reviews.freebsd.org/D41381

This revision now requires review to proceed.Aug 14 2023, 5:51 PM

Update after peerlist rebase, adding pidfile_remove() in cleanup

jfree retitled this revision from syslogd: Pre-open console file descriptor to syslogd: Do not open consfile descriptor.
jfree edited the summary of this revision. (Show Details)
jfree retitled this revision from syslogd: Do not open consfile descriptor to syslogd: Do not open console descriptor.
jfree edited the summary of this revision. (Show Details)

Close console/tty descriptors while config parsing.

This revision is now accepted and ready to land.Aug 23 2023, 2:44 PM
This revision was automatically updated to reflect the committed changes.