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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user