Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2023 16:47:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274454] usr.sbin/syslogd: closing a configured terminal in parse_action(), line 3057
Message-ID:  <bug-274454-227-5kEtAllnPT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-274454-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-274454-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274454

Jake Freeland <jake@technologyfriends.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jake@technologyfriends.net

--- Comment #3 from Jake Freeland <jake@technologyfriends.net> ---
(In reply to Trond Endrest=C3=B8l from comment #0)
Hi Trond,

I'm not really sure what you mean by "made /dev/ttyvb inactive".

A TTY descriptor is only opened in parse_action() to check whether it is a
valid tty using isatty(). That descriptor is closed because it will never be
accessed again.

See
https://cgit.freebsd.org/src/tree/usr.sbin/syslogd/syslogd.c?id=3Da5ed6a815=
e38d6c622cd97a6020592ded579cf7a#n1973

When a log message is sent to a TTY, its path (saved in f->fu_fname) is pas=
sed
into ttymsg() and used to reopen the TTY under a new, temporary descriptor.
That original descriptor value (f->f_file) is never actually used.

Did your patch fix the issue you were facing? If so, there is something I am
not seeing here.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274454-227-5kEtAllnPT>