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)
Sun, Jun 23, 8:28 PM
Unknown Object (File)
Fri, Jun 21, 7:08 AM
Unknown Object (File)
Thu, Jun 20, 10:24 AM
Unknown Object (File)
Fri, Jun 7, 11:47 AM
Unknown Object (File)
Mon, Jun 3, 5:54 AM
Unknown Object (File)
May 19 2024, 1:52 PM
Unknown Object (File)
May 15 2024, 8:40 PM
Unknown Object (File)
Apr 20 2024, 3:57 PM
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.