|
From: | Bastien ROUCARIES |
Subject: | RE : isatty() and errno |
Date: | Tue, 8 Nov 2011 08:55:28 +0100 |
isatty should be pached under windows. Try isatty(/dev/null)
Bastien
Le 8 nov. 2011 00:53, "Eric Blake" <address@hidden> a écrit :
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |