Updating signals in exit and lockfile traps.
This commit is contained in:
parent
141b4f7e0f
commit
425f88e9ec
|
@ -27,5 +27,5 @@ Exit ()
|
||||||
Setup_cleanup ()
|
Setup_cleanup ()
|
||||||
{
|
{
|
||||||
Echo_message "Setting up cleanup function"
|
Echo_message "Setting up cleanup function"
|
||||||
trap 'Exit' INT TERM HUP EXIT
|
trap 'Exit' EXIT HUP INT QUIT TERM
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ Create_lockfile ()
|
||||||
mkdir -p "${DIRECTORY}"
|
mkdir -p "${DIRECTORY}"
|
||||||
|
|
||||||
# Creating lock trap
|
# Creating lock trap
|
||||||
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT
|
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT HUP INT QUIT TERM
|
||||||
|
|
||||||
# Creating lock file
|
# Creating lock file
|
||||||
touch "${FILE}"
|
touch "${FILE}"
|
||||||
|
|
Loading…
Reference in New Issue