]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
isatty.3: Most non-tty files nowadays result in the error ENOTTY
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 25 Feb 2019 14:39:59 +0000 (15:39 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 25 Feb 2019 14:39:59 +0000 (15:39 +0100)
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>
man3/isatty.3

index 60639c617b50673510dbd7e6470d3d013f1b3595..ffb0ff24cb676d4eb9bf56a6727069a6064b35ac 100644 (file)
@@ -52,13 +52,15 @@ is set to indicate the error.
 .I fd
 is not a valid file descriptor.
 .TP
 .I fd
 is not a valid file descriptor.
 .TP
-.B EINVAL
+.B ENOTTY
 .I fd
 refers to a file other than a terminal.
 .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).
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).