HomeFreeBSD

syslogd: Do not open console descriptor

Description

syslogd: Do not open console descriptor

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.

Reviewed by: markj
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41380

Details

Provenance
jfreeAuthored on Sep 1 2023, 2:51 AM
markjCommitted on Sep 28 2023, 3:51 PM
Reviewer
markj
Differential Revision
D41380: syslogd: Do not open console descriptor
Parents
rG5b44c24f8524: syslogd: unlink() -> unlinkat()
Branches
Unknown
Tags
Unknown