Re: VT-less kernels, and /dev/console on x86

From: nerdopolis
Date: Wed Oct 09 2024 - 14:40:30 EST


On Wednesday, October 9, 2024 5:24:49 AM EDT Bernd Petrovitsch wrote:
> Hi all!
>
> On 18.08.24 02:09, nerdopolis wrote:
> [...]
> > I originally brought this up on linux-serial, but I think it makes more sense
> > that it's part of how printk console device selection works. Without VTs, while
> > most software is able to handle the situation, some userspace programs expect
> > /dev/console to still be responsive. Namely systemd. It calls isatty() against
> > /dev/console, and since /dev/console on VT-less systems currently defaults to
> > /dev/ttyS0, and when /dev/ttyS0 is disconnected, the ioctl's fail, and it
> > refuses to write log messages to it.
>
> What's wrong with fixing systemd?
The change was rejected, as they want the isatty() call on /dev/console
despite it returning false due to the i/o error

https://github.com/systemd/systemd/pull/33690
>
> Kind regards,
> Bernd
>