[OE-core] [PATCH] busybox: Guard against interrupted compiles

Richard Purdie richard.purdie at linuxfoundation.org
Mon Jan 23 14:41:17 UTC 2017


On Mon, 2017-01-23 at 15:37 +0100, Mario Domenech Goulart wrote:
> On Mon, 23 Jan 2017 13:05:48 +0000 Richard Purdie <richard.purdie at lin
> uxfoundation.org> wrote:
> > On Mon, 2017-01-23 at 13:56 +0100, Mario Domenech Goulart wrote:
> > > On Mon, 23 Jan 2017 12:35:52 +0000 Richard Purdie
> > > <richard.purdie at linuxfoundation.org> wrote:
> > > Wouldn't it be better to have something like
> > > 
> > >    cp .config.orig .config || true
> > > 
> > > instead, to prevent race conditions?
> > Prevent which race condition? I'd hope at this point we're the only
> > thing touching the .config file?
> Yeah, I hope so.
> 
> I mean, the "if exists(file){ do_something_with(file) }" idiom is
> intrinsically subject to race conditions (time of check to time of
> use).
> If we can [easily] avoid them, why not?

I think it makes the code harder to read/understand and we don't need
to do that...

Cheers,

Richard



More information about the Openembedded-core mailing list