Re: [patch] ptsname.3: Fix description of failure behaviour of ptsname_r

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rich Felker wrote:
> I would prefer something like:
> 
>   "glibc historically stores the error number in errno in addition to
>   returning it. Assuming this behavior is not portable; applications
>   should use the return value, not errno, to determine the result."

I claim that "applications should use the return value, not errno, to
determine the result" independently of whether the glibc maintainers
decide to keep the current "historical" behaviour or not. Simply because
the new text that is scheduled to be included in POSIX Issue 8 does
not mention 'errno' here.

> Non-setting of errno is not part of the contract of the musl libc
> implementation of this function

Nonetheless, I find it worth mentioning in the comments (not the text)
of the man page, simply because musl libc is currently the most
important libc available for Linux that does not set 'errno' here.

Bruno




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux