This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fixing mkinstalldirs to avoid non-thread-safe mkdir -p


Nathanael Nerode <neroden@twcny.rr.com> writes:

> I'd like to propose this patch for GCC 3.4; it fixes a stupid regression
> on Solaris 2.7 / Solaris 8, where mkdir -p is not thread-safe.

I'm not sure thread-safe is the word that you want here, since mkdir
itself is not threaded.  When that phrase was first used in this thread,
my immediate reaction is "why would that matter?"

I don't know if there's another good word that means "not safe against
concurrent invocation."

> +# Solaris 8's mkdir -p isn't thread-safe!  If you mkdir -p a/b and
> +# mkdir -p a/c at the same time, both will detect that a is missing,
> +# one will create a, then the other will try to create a and die with
> +# a "File exists" error.  So we have to disable this code on Solaris 8.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]