[Top][All Lists]

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

race condition in autom4te

From: Ralf Wildenhues
Subject: race condition in autom4te
Date: Fri, 12 Jun 2009 13:40:14 +0200
User-agent: Mutt/1.5.19 (2009-06-09)

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. testing ...
> ../../autoconf/tests/ echo AC_INIT | autom4te 
> --language=autoconf -o configure
> 0a1
> > autom4te: cannot create autom4te.cache: File exists
> ../../autoconf/tests/ exit code was 1, expected 0
> 29. 29. autom4te cache locking ( FAILED 
> (

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


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

diff --git a/bin/ b/bin/
index 471b165..cf425bb 100644
--- a/bin/
+++ b/bin/
@@ -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

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