Page MenuHomeFreeBSD

syslogd: Do not open console descriptor
ClosedPublic

Authored by jfree on Aug 8 2023, 4:35 PM.
Tags
None
Referenced Files
F106203225: D41380.diff
Fri, Dec 27, 2:42 AM
Unknown Object (File)
Fri, Dec 20, 2:00 PM
Unknown Object (File)
Mon, Dec 9, 3:15 PM
Unknown Object (File)
Sun, Dec 1, 8:28 PM
Unknown Object (File)
Nov 27 2024, 12:54 PM
Unknown Object (File)
Nov 7 2024, 3:35 AM
Unknown Object (File)
Nov 7 2024, 3:30 AM
Unknown Object (File)
Nov 7 2024, 3:25 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.