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>
.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).