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)
Fri, Nov 14, 4:19 AM
Unknown Object (File)
Thu, Nov 13, 4:45 AM
Unknown Object (File)
Wed, Nov 12, 7:20 PM
Unknown Object (File)
Thu, Nov 6, 5:09 AM
Unknown Object (File)
Tue, Nov 4, 5:47 AM
Unknown Object (File)
Tue, Oct 28, 11:30 PM
Unknown Object (File)
Sun, Oct 26, 11:14 AM
Unknown Object (File)
Sun, Oct 26, 4:28 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.