* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Initialize

`tmp' to avoid file removal race.
This commit is contained in:
Ralf Wildenhues 2005-11-08 07:11:58 +00:00
parent 4d2acc6228
commit 96410b4a9d
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-11-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Initialize
`tmp' to avoid file removal race.
2005-11-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize

View File

@ -1317,9 +1317,14 @@ fi
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
trap 'exit_status=$?; rm -fr "$tmp" && exit $exit_status' 0
tmp=
trap 'exit_status=$?
{ test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
trap 'AS_EXIT([1])' 1 2 13 15
}
dnl The comment above AS_TMPDIR says at most 4 chars are allowed.