On 11/10/2011 06:02 AM, Eric Blake wrote:
Not necessarily. On many of the existing standardized *_r functions, and
more particularly on ptsname_r, POSIX requires that the function returns
^^^^^^^^^
Correction - the closest existing standardized function I had in mind is
ttyname_r (since on some platforms, ptsname_r can be implemented in
terms of ttyname_r); especially when comparing ttyname to ttyname_r.
[Serves me right for typing too fast after waking up ;) ].
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ttyname_r.html
Upon successful completion, ttyname() shall return a pointer to a
string. Otherwise, a null pointer shall be returned and errno set to
indicate the error.
If successful, the ttyname_r() function shall return zero. Otherwise, an
error number shall be returned to indicate the error.
--
Eric Blake ebl...@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org