On 11/07/2011 04:52 PM, Eric Blake wrote:
Yuck. Making ptsname_r wrap ptsname() makes it possible to avoid the
isatty() non-errno on Solaris, but exposes a FreeBSD 8.2 bug that
ptsname(-1) doesn't set errno.

Alas, I can't call that a FreeBSD bug; just as with isatty and ttyname[_r], POSIX leaves errno unspecified on ptsname failure. On the other hand, while the POSIX spec of isatty and ttyname both list may fail errors of EBADF and ENOTTY, it didn't list any may fails on ptsname, so maybe that will be corrected in a future revision of POSIX:
http://austingroupbugs.net/view.php?id=503

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to