Re: [PATCH] wrapper: add workaround for open() returning EINTR

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

 



On Wed, Feb 24, 2021 at 08:20:57AM +0100, Johannes Sixt wrote:

> Am 24.02.21 um 05:43 schrieb Jeff King:
> > The workaround here is enabled all the time, without a Makefile knob,
> > since it's a complete noop if open() never returns EINTR. I did push it
> > into its own compat/ source file, though, since it has to #undef our
> > macro redirection. Putting it in a file with other code risks confusion
> > if more code is added after that #undef.
> 
> I'm not so much opposed to "enable it all the time" in general, but when
> we already have an override of open(), like for the Windows case in
> compat/mingw.h, I find it a bit rough to put another wrapper around it,
> even more so since we won't have the EINTR problem on Windows due to the
> absence of signals.

That's fair. I don't think my new wrapper would interact well with
mingw_open(). They are both trying to #define open. I think since mine
comes later in git-compat-util.h, it is probably overriding mingw_open()
completely on Windows, which is quite bad (we call into my function in
wrapper.c, but then its "#undef open" means we get the original open(),
not the previously defined wrapper).

-Peff



[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