[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
the _AS_EXPR_PREPARE, _AS_LN_S_PREPARE, _AS_TEST_PREPARE, and
_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
fi
+# to avoid race condition, we need our own sandbox
+as_save_cwd=`pwd`
+AS_TMPDIR(acs)
+cd $tmp
_AS_EXPR_PREPARE
_AS_LN_S_PREPARE
_AS_TEST_PREPARE
_AS_UNSET_PREPARE
+cd $as_save_cwd
+rm -rf $tmp
+AS_UNSET([as_save_cwd])
# NLS nuisances.
AS_UNSET([LANG], [C])
- [patch] remove config.status race condition,
Lars J. Aas <=
- Re: [patch] remove config.status race condition, Pavel Roskin, 2001/02/15
- Re: [patch] remove config.status race condition, Lars J. Aas, 2001/02/16
- Re: [patch] remove config.status race condition, Akim Demaille, 2001/02/23
- Re: [patch] remove config.status race condition, Pavel Roskin, 2001/02/23
- Re: [patch] remove config.status race condition, Akim Demaille, 2001/02/23
- Re: [patch] remove config.status race condition, Pavel Roskin, 2001/02/23
- Re: [patch] remove config.status race condition, akim, 2001/02/23
- Re: [patch] remove config.status race condition, Pavel Roskin, 2001/02/24
- Re: [patch] remove config.status race condition, akim, 2001/02/24
- Re: [patch] remove config.status race condition, Akim Demaille, 2001/02/25