Our assumption in ptsname.c is that isatty() will set errno on invalid
fds. But this is not required by POSIX, and indeed not enforced by
Solaris 10; that is, our ptsname.c implementation was copied from glibc,
and was making an assumption only guaranteed by glibc's implementation
choice for isatty(), which ends up leaving errno unchanged when that
code is compiled on Solaris.
But that means it is likely that other GNU code will assume isatty()
sets errno. Should we provide an isatty() module that guarantees that
errno will be set when returning 0? Or should I just patch ptsname.c to
guarantee that errno is set without relying on isatty() to do the job?
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org