]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tty: fix exit code with EINVAL
authorPádraig Brady <P@draigBrady.com>
Wed, 30 Aug 2017 07:55:34 +0000 (00:55 -0700)
committerPádraig Brady <P@draigBrady.com>
Wed, 30 Aug 2017 08:29:53 +0000 (01:29 -0700)
commitd95294982960a4a81889722fd79f1fedc04c8ee5
tree05292d5a7493b9a2db27bee5528cb76fb92aea59
parentf5d7c0842ef7adc2be6e85f9ef66b35ebbbd6a61
tty: fix exit code with EINVAL

* src/tty.c (main): All systems mention that isatty()
man return EINVAL as well as (the POSIX compliant) ENOTTY.
Also Centos 6 was seen to return EINVAL from ttyname().
* tests/misc/tty.sh: Fix a test issue where we assume
standard input is always a valid tty.
Reported by Assaf Gordon on OpenSolaris 5.10 and 5.11,
and Centos 6.5
src/tty.c
tests/misc/tty.sh