Re: [PATCH] builtin/credential-cache--daemon: fix error when "exit"ing on Cygwin

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

 




On 16/10/2024 16:09, Jeff King wrote:
> On Wed, Oct 16, 2024 at 10:55:40AM -0400, Jeff King wrote:
> 
>>> The logic is broken on Cygwin though: when a client asks the daemon to
>>> exit, they won't see the EOF and will instead get an error message:
>>>
>>>   fatal: read error from cache daemon: Software caused connection abort
>>>
>>> This issue is known in Cygwin, see for example [1], but the exact root
>>> cause is not known.
>>> [...]
>>> [1]: https://github.com/cygporter/git/issues/51
>>
>> I don't see any details at that issue, but I'm not sure how it would fix
>> things. From the client's perspective, they are going to see the
>> descriptor either way. Unless there is some magic that fclose() does
>> that a normal descriptor-close-on-exit does not do.
>>
>> That "Software caused connection abort" thing seems like a weird
>> not-standard-Unix errno value. Searching for it mostly yields people
>> complaining about getting it from ssh under cygwin. :)
>>
>> If the magic that cygwin needs is actually "fclose before unlink", then
>> that is in opposition to other platforms (and I suspect would make t0301
>> racy there).
> 
> This all seemed eerily familiar. Try this thread:
> 
>   https://lore.kernel.org/git/9dc3e85f-a532-6cff-de11-1dfb2e4bc6b6@xxxxxxxxxxxxxxxxxxxx/
> 
> It looks like the conclusion was that we should adjust errno handling on
> the client side, but nobody ever followed up with an actual patch.

Heh, our emails crossed. Yes, I was hoping that, given that Adam had identified
the cygwin commit that caused the regression, some resolution on the cygwin
side would fix things up. I waited ... and then put it on my TODO list! :)

I did look at the cygwin commit and it wasn't at all obvious what happened.
In fact there was a comment about making sure that errno values didn't
change as a side-effect!

Sorry for being tardy, again ...

ATB,
Ramsay Jones







[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