[Top][All Lists]

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

[patch] remove config.status race condition

From: Lars J. Aas
Subject: [patch] remove config.status race condition
Date: Tue, 13 Feb 2001 14:43:20 +0100
User-agent: Mutt/1.2.5i

This patch removes a race condition in config.status.

The culprit is the initial tests in config.status for finding how to
link files and how to test for executable files.  In this phase, the file
"conftest.file" is created and removed in the current directory twice.
This will of course randomly fail when config.status is run in parallell,
which might happen during parallell builds, and certainly happens when
config.status is used multiple times in a pipe.

The problem is resolved by moving to a temporary directory during the
problematic tests.  I don't really think config.status should contain
"configure tests" at all, but I don't have intimate knowledge on why the
tests are run in config.status and not just precomputed by configure,
so I left them in.

  Lars J

2001-02-13  Lars J. Aas  <address@hidden>

        * m4sh.m4 (AS_SHELL_SANITIZE): Invoke AS_TMPDIR(acs) and perform
        _AS_UNSET_PREPARE tests in the temporary directory to avoid race
        condition problem.

Index: m4sh.m4
RCS file: /cvs/autoconf/m4sh.m4,v
retrieving revision 1.30
diff -u -r1.30 m4sh.m4
--- m4sh.m4     2001/01/29 15:24:11     1.30
+++ m4sh.m4     2001/02/13 13:25:04
@@ -66,10 +66,17 @@
   set -o posix
+# to avoid race condition, we need our own sandbox
+cd $tmp
+cd $as_save_cwd
+rm -rf $tmp
 # NLS nuisances.
 AS_UNSET([LANG],        [C])

reply via email to

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