This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 2/3] manual: clarify errno value on success [BZ #22615]


* Dmitry V. Levin:

> On Fri, Dec 29, 2017 at 03:46:54PM +0300, Dmitry V. Levin wrote:
>> On Fri, Dec 22, 2017 at 08:31:00PM +0100, Aurelien Jarno wrote:
>> > The current glibc manual is ambiguous about the errno value on success
>> > and suggests that it is left unchanged. Some functions might and
>> > sometimes do change the errno value, however they never set it to 0.
>> 
>> The trailing part "however they never set it to 0" is not quite correct:
>> the next patch in the series moves "__set_errno (0)" around.
>
> Sorry, my example doesn't apply, but do we really guarantee they never
> set errno to 0?

Some of the NSS functions set errno to zero to indicate that the
lookup was successful, but did not yield any results.  There are
applications out there which rely on this behavior because they do not
set errno to 0 before calling the affected function (and
pwd/tst-getpw.c indirectly checks for this behavior).  This is bug
21898.

I'm not sure if we can fix this without introducing new symbol
versions.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]