bug-coreutils
[Top][All Lists]
Advanced

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

Re: proposed fix for some race conditions in mkdir and install


From: Paul Eggert
Subject: Re: proposed fix for some race conditions in mkdir and install
Date: Mon, 18 Sep 2006 01:33:02 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

>> I initially tried something like that, but got too confused by it,
>> perhaps partly because I wanted to fall back on something like the
>> current approach when mkdirat didn't work (which is a common case
>> these days, even on GNU/Linux systems, alas).
>
> What do you mean?
> Of course, for at-function-syscall support, you need Linux 2.6.16 or
> newer, but gnulib's mkdirat emulation works well also with /proc/self/fd/N
> support, which is available back at least to linux-2.4.x.
> Admittedly, /proc isn't always available, but I wouldn't say that's "common".

I was thinking of the "/proc isn't available" case.
You're right, it's not that common, but we do
get bug reports....

I was also worried a bit about bugs in /proc itself, which are more
likely to be tickled by these usages.  For example:

mkdir -p /proc/self/fd/0/../tmp/foo </

where if we use /proc/self/fd internally, then we're in effect using
/proc/self/fd once on itself.  It _should_ work, even when the file
name crosses mount points, but _does_ it?  (I'm almost afraid to try.
:-)




reply via email to

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