On 09/12/18 21:07, Rich Felker wrote: > The EBADF error for isatty is optional and musl's does not set it, so > this patch does not work as-is. I think returning ENOTTY for cases for > which it does not apply in ttyname_r is non-conforming though, so > some change similar to this is probably needed. If isatty were > modified to set errno, I think we could just return errno here. > > Rich > Please do feel free to work on isatty's error handling, though, Benjamin (or others). It is non-conformant as it stands; it returns 0 for /dev/null and it does not error on a closed fd. We're tracking this and other issues at the following URL (but note, it's a little bit behind and a few have been fixed since): https://wiki.adelielinux.org/wiki/POSIX Best, --arw -- A. Wilcox (awilfox) Project Lead, Adélie Linux https://www.adelielinux.org