Though POSIX.1 does not specify it, I think we want all GNU libc implementations of isatty to set errno in the canonical way, i.e. to either EBADF or ENOTTY. This happens using the existing definition that calls tcgetattr, and that is the way isatty works in FreeBSD libc too. I don't see a reason to change the callers.