Skip to content

community/elogind: fix tty restore

Gil Pedersen requested to merge kanongil/aports:elogind-tty-reset into master

This fixes an issue when GUI sessions are stopped, where the TTY is not restored to text mode, resulting in a non-responsive TTY1 virtual terminal (cannot even switch using the ctrl-alt-fX keyboard shortcut).

This seems to be an upstream SystemD issue, resulting from this commit. Specifically, the commit changes the vt_restore() code to effectively return -ENOTTY (under musl), instead of -EIO. This causes the calling code fallback logic to NOT run! Note that I expect the patch actually works on glibc, which can probably return EIO from the isatty() call (against the POSIX spec).

I don't have the patience to try and fix it there, so a local patch will have to do. It just removes redundant isatty() checks, making the following ioctl() error with ENOTTY / EIO as appropriate.

Merge request reports

Loading