On Wed, Jun 29, 2016 at 7:53 PM, Paul Smith <[email protected]> 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 _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
