Hi Eric,

I've had my lucky day today in hitting this race condition out in the
wild on a HP-UX 10.20 system:

> 29. tools.at:1017: testing ...
> ../../autoconf/tests/tools.at:1023: echo AC_INIT | autom4te 
> --language=autoconf -o configure
> 0a1
> > autom4te: cannot create autom4te.cache: File exists
> ../../autoconf/tests/tools.at:1023: exit code was 1, expected 0
> 29. tools.at:1017: 29. autom4te cache locking (tools.at:1017): FAILED 
> (tools.at:1023)

I haven't been able to reproduce this any more than this one time, with
lots of tries.  Anyway, it is fixed easily, and I've pushed this patch
below.

Cheers,
Ralf

    Fix concurrent autom4te.cache directory creation race.
    
    * bin/autom4te.in: Do not error out if another `autom4te'
    instance created the cache directory before we could.

diff --git a/bin/autom4te.in b/bin/autom4te.in
index 471b165..cf425bb 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -972,10 +972,11 @@ if ($freeze)
     exit $exit_code;
   }
 
-# We need our cache directory.
+# We need our cache directory.  Don't fail with parallel creation.
 if (! -d "$cache")
   {
     mkdir "$cache", 0755
+      or -d "$cache"
       or fatal "cannot create $cache: $!";
   }
 


Reply via email to