diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2019-02-25 15:39:59 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2019-02-25 15:39:59 +0100 |
| commit | 44e9941b97bc4b6b5841f5c19ea9e9159104429f (patch) | |
| tree | a322dc5ecdc4510d101c23aa011ca9731528d75f /man3 | |
| parent | ff5fa0ace32c326aa3c0423f2b561ca0db5f211f (diff) | |
| download | man-pages-44e9941b97bc4b6b5841f5c19ea9e9159104429f.tar.gz | |
isatty.3: Most non-tty files nowadays result in the error ENOTTY
Historically, at least FIFOs and pipes yielded the error EINVAL.
Reported-by: Jakub Wilk <jwilk@jwilk.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
| -rw-r--r-- | man3/isatty.3 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/man3/isatty.3 b/man3/isatty.3 index 60639c617b..ffb0ff24cb 100644 --- a/man3/isatty.3 +++ b/man3/isatty.3 @@ -52,13 +52,15 @@ is set to indicate the error. .I fd is not a valid file descriptor. .TP -.B EINVAL +.B ENOTTY .I fd refers to a file other than a terminal. -POSIX.1 specifies the error -.BR ENOTTY -.\" FIXME . File a bug for this? -for this case. +On some older kernels, some types of files +.\" e.g., FIFOs and pipes on 2.6.32) +resulted in the error +.B EINVAL +in this case (which is a violation of POSIX, which specifies the error +.BR ENOTTY ). .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7). |
