fd refers to a file other than a terminal. On some older kernels,
some types of files resulted in the error EINVAL in this case
(which is a violation of POSIX, which specifies the error
ENOTTY).
ATTRIBUTES
For an explanation of the terms used in this section, see
attributes(7).