This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] Fixing mkinstalldirs to avoid non-thread-safe mkdir -p
- From: Russ Allbery <rra at stanford dot edu>
- To: neroden at twcny dot rr dot com (Nathanael Nerode)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 08 Feb 2004 01:35:37 -0800
- Subject: Re: [RFA] Fixing mkinstalldirs to avoid non-thread-safe mkdir -p
- Organization: The Eyrie
- References: <20040208080807.GA29635@twcny.rr.com>
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/>