fix: exit with the error code
This commit is contained in:
parent
d39cd11605
commit
e3bd62e6bd
1 changed files with 4 additions and 2 deletions
|
@ -29,9 +29,11 @@ ensure() {
|
||||||
# Remove the lock after synchronization
|
# Remove the lock after synchronization
|
||||||
rm -f "${lock}"
|
rm -f "${lock}"
|
||||||
|
|
||||||
|
# Exit with the error code
|
||||||
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
for SIG in TERM QUIT INT HUP; do
|
for SIG in 1 2 3 6 9 14 15; do
|
||||||
trap "ensure ${SIG}" ${SIG}
|
trap "ensure ${SIG}" ${SIG}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -113,4 +115,4 @@ case $1 in
|
||||||
done
|
done
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ensure
|
ensure 0
|
||||||
|
|
Loading…
Reference in a new issue