[Top][All Lists]

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

Re: mkdir doco

From: Jim Meyering
Subject: Re: mkdir doco
Date: Thu, 19 Feb 2004 00:07:08 +0100

Alexandre Duret-Lutz <address@hidden> wrote:
>       * doc/autoconf.texi (Limitations of Usual Tools) <mkdir>: `mkdir -p'
>       is not always thread-safe.  From Nathanael Nerode.
> address@hidden exists} error.  At least Solaris 8, NetBSD 1.6, and OpenBSD
> +3.4 have an unsafe @code{mkdir -p}.  GNU Coreutils (since version 3.16),

Hi Alexandre!

Thanks for documenting that.
One minor correction: I think that bug in GNU mkdir was fixed
in fileutils-4.1-b2, which was followed by fileutils-4.0c.

FWIW, the bug was exposed when I saw parallel builds failing
because `mkdir -p lock-directory' would sometimes fail.
Here's the relevant ChangeLog entry:

1999-01-01  Jim Meyering  <address@hidden>

        * lib/makepath.c (make_dir): New function, factored out of make_path.
        (make_path): Use make_dir rather than open-coding it twice.
        This effectively reverses the order of the latter pair of stat/mkdir
        calls and fixes a race condition bug whereby one of two concurrent
        `mkdir -p' processes could fail with EEXIST.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]