Revert previous commit: one cannot setup the trap before acquiring the

lockfile, because we do not want the trap to be launched if the acquirement
makes the script exit!
This commit is contained in:
Laurent Rineau 2009-07-20 09:46:05 +00:00
parent 90d0abd973
commit ac86e1b70a
1 changed files with 3 additions and 3 deletions

View File

@ -858,9 +858,6 @@ else
MAKE_CMD='make'
fi
# that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM
# Acquire lock
lockfile -r 5 "$LOCK_FILE";
if [ ${?} != 0 ]; then
@ -868,6 +865,9 @@ if [ ${?} != 0 ]; then
exit 1;
fi
# that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM
# Notify test started
if [ ! "${MAIL_ADDRESS}" = "must_be_set_in_.autocgalrc" ]; then
for i in ${MAIL_ADDRESS}; do