bug-wget
[Top][All Lists]
Advanced

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

Re: Confusing "Success" error message


From: Andries E. Brouwer
Subject: Re: Confusing "Success" error message
Date: Fri, 8 Nov 2019 17:29:21 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Nov 08, 2019 at 06:13:53PM +0200, Eli Zaretskii wrote:

>>>> Libc functions are free to call other functions internally,
>>>> and such internal calls may fail where the outer level call
>>>> does not fail. So even if a libc function does not return
>>>> an error, errno can have changed.
>>> 
>>> That would be a bug in libc, I think.  Its functions should save and
>>> restore errno if other functions they call error out without causing
>>> the calling function to fail.
>> 
>> Here is the POSIX man page:
>> 
>> ...
>>  The  value  in  errno  is significant only when the return value of the
>>  call indicated an error (i.e., -1 from most system calls;  -1  or  NULL
>>  from  most  library  functions); a function that succeeds is allowed to
>>  change errno.
> 
> Thanks, but AFAIU this says the same as I did: if a function succeeds,
> it should not modify errno.

I think your understanding of the English language differs from mine.
Did you read the line "a function that succeeds is allowed to change errno"?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]