Re: [PATCH v2 0/2] Brown-bag fix on top of js/mingw-inherit-only-std-handles

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

 



Andreas Schwab <schwab@xxxxxxxxxxxxxx> writes:

> On Nov 30 2019, Johannes Sixt wrote:
>
>> Am 30.11.19 um 19:04 schrieb Junio C Hamano:
>>> "Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
>>> writes:
>>> 
>>>>  * We now assign errno only when the call to CreateProcessW() failed.
>>> 
>>> Meaning the global variable 'errno' is left as it was (instead of
>>> getting cleared) when a system call succeeds?  That I think is the
>>> correct behaviour people who use the variable expect.
>>
>> I hope you mean people who read the code. You cannot possibly mean
>> developers who expect that the run-command API keeps errno unchanged if
>> the calls were successful. I'm pretty sure they do not provide such a
>> guarantee.
>
> POSIX guarantees that no library function sets errno to zero.

It is true, but the rest of the Git code works on top of an
abstraction a bit higher than C/POSIX library.  The run-command API
J6t cites is an example.

IOW, we cannot take advantage of that POSIX guarantee in the
codepaths that use our internal API.  So...





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux