[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkdir doco
Re: mkdir doco
Thu, 19 Feb 2004 00:23:55 +0100
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)
>>> "Jim" == Jim Meyering <address@hidden> writes:
Jim> One minor correction: I think that bug in GNU mkdir was fixed
Jim> in fileutils-4.1-b2, which was followed by fileutils-4.0c.
Thanks! Maybe it's enough if I write just `GNU Coreutils', since
all versions of GNU Coreutils are OK. Or shall I say
`GNU Coreutils (since Fileutils version 4.0c)'?
Jim> FWIW, the bug was exposed when I saw parallel builds failing
Jim> because `mkdir -p lock-directory' would sometimes fail.
Jim> Here's the relevant ChangeLog entry:
Jim> 1999-01-01 Jim Meyering <address@hidden>
Jim> * lib/makepath.c (make_dir): New function, factored out of make_path.
Jim> (make_path): Use make_dir rather than open-coding it twice.
Jim> This effectively reverses the order of the latter pair of stat/mkdir
Jim> calls and fixes a race condition bug whereby one of two concurrent
Jim> `mkdir -p' processes could fail with EEXIST.
I stopped when I found this one:
Tue Jul 1 06:42:17 1997 Jim Meyering <address@hidden>
* lib/makepath.c (make_path): Reorder stat-then-mkdir-if-missing
calls so that mkdir is called first. Before make_path would first
`stat' a directory, then call mkdir if it didn't exist. But if
some other process created the directory between the stat & mkdir,
the mkdir would fail with EEXIST. Diagnosis and suggestion from