Page MenuHomeFreeBSD

syslogd: Do not open console descriptor
ClosedPublic

Authored by jfree on Aug 8 2023, 4:35 PM.
Tags
None
Referenced Files
F115658770: D41380.id126343.diff
Sat, Apr 26, 4:57 PM
F115629882: D41380.id126343.diff
Sat, Apr 26, 6:22 AM
Unknown Object (File)
Wed, Apr 23, 1:50 PM
Unknown Object (File)
Wed, Apr 23, 1:42 PM
Unknown Object (File)
Tue, Apr 22, 3:04 PM
Unknown Object (File)
Sun, Apr 20, 5:30 PM
Unknown Object (File)
Sun, Apr 20, 12:00 PM
Unknown Object (File)
Sat, Apr 19, 5:37 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.