Fix to allow more correct isatty()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | tty: respond to TIOCGWINSZ when hungdrivers/ | +22 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] Fix to allow more correct isatty()
This patch comes from an issue discovered in systemd, where it can fail to restore a text TTY session after a GUI session is stopped when compiled with musl libc.
The specific systemd integration issue is currently resolved in the musl master branch by closer aligning the implementation with glibc, but the underlying isatty() implementation is still flawed since it can return 0 (false) for something that is definitely a TTY. Essentially both musl and glibc give up correctly handling this case on Linux due to inadequate/buggy kernel APIs.
Thus I am proposing this patch as a solution to fix the kernel APIs. An alternative fix could be to add a new IOCTL to specifically handle this, but that seems overkill.
Gil Pedersen (1):
tty: respond to TIOCGWINSZ when hung
drivers/tty/tty_io.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-)
Signature · 1 line
2.45.2