1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

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.
This commit is contained in:
Paul Eggert
2025-06-20 11:53:21 -07:00
parent efaec80781
commit aec89a3e7d
5 changed files with 27 additions and 10 deletions

View File

@@ -16020,6 +16020,7 @@ Exit status:
1 if standard input is a non-terminal file
2 if given incorrect arguments
3 if a write error occurs
4 if the terminal's name cannot be determined
@end display