[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can't always get make to auto create build directory
From: |
David Boyce |
Subject: |
Re: can't always get make to auto create build directory |
Date: |
Wed, 29 Jun 2016 20:24:47 -0700 |
On Wed, Jun 29, 2016 at 7:53 PM, Paul Smith <address@hidden> wrote:
> Not only is there no value in it, it's actually LESS robust to make the
> check because between the time make checks for the directory and the
> time it runs "mkdir", some other program could have created it.
To be painfully precise, the same race condition exists with and without
the explicit check because mkdir -p does the same check+create internally.
The only difference is the width of the race window; internally to mkdir
the window is between two system calls (stat() and mkdir()) whereas with
the explicit check there's a fork/exec interposed which is much wider.
There's always a race when mkdir -p is used.
-David
- Re: can't always get make to auto create build directory, (continued)
- Re: can't always get make to auto create build directory, Yann Droneaud, 2016/06/29
- Re: can't always get make to auto create build directory, LMH, 2016/06/29
- Re: can't always get make to auto create build directory, Paul Smith, 2016/06/29
- Re: can't always get make to auto create build directory, Philip Guenther, 2016/06/29
- Re: can't always get make to auto create build directory, LMH, 2016/06/29
- Re: can't always get make to auto create build directory, Paul Smith, 2016/06/29
- Re: can't always get make to auto create build directory, Eli Zaretskii, 2016/06/29
- Re: can't always get make to auto create build directory, LMH, 2016/06/29
- Re: can't always get make to auto create build directory, David Boyce, 2016/06/29
- Re: can't always get make to auto create build directory, Paul Smith, 2016/06/29
- Re: can't always get make to auto create build directory,
David Boyce <=
- Re: can't always get make to auto create build directory, Tony Theodore, 2016/06/30