]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tty: better fix for Bug#26371
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Jun 2025 18:53:21 +0000 (11:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Jun 2025 19:15:27 +0000 (12:15 -0700)
commitaec89a3e7dfaed1545b2dcaa8525df21cf61a37e
tree5792c2d949af23d11ffe2e92a9f12da2b34622f7
parentefaec8078142996d958b6720b85a13b12497c3d0
tty: better fix for Bug#26371

* src/tty.c (TTY_USAGE): Rename from TTY_FAILURE, since this
is used only for usage failures.  All uses changed.
(TTY_TTYNAME_FAILURE): New constant.
(main): Remove no-longer-needed assignment of ENOENT to errno.
Make status-setting clearer too.
Report an error if ttyname fails even though stdin is a terminal,
instead of silently pretending that stdin is not a terminal.
* tests/tty/tty.sh: Test for this issue.  This should fix Bug#78244.
NEWS
THANKS.in
doc/coreutils.texi
src/tty.c
tests/tty/tty.sh