Improving trap call to unmount pseudo filesystem when failing as suggested by Justin Pryzby <jpryzby@quoininc.com>.
This commit is contained in:
parent
02c57db196
commit
5fec5b20a4
|
@ -30,7 +30,7 @@ Create_lockfile ()
|
|||
mkdir -p "${DIRECTORY}"
|
||||
|
||||
# Creating lock trap
|
||||
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT
|
||||
trap 'ret=${?}; '"rm -f \"${FILE}\"; for FILESYSTEM in devpts proc sys; do lh_chroot_${FILESYSTEM} remove || continue; done"' exit ${ret}' EXIT
|
||||
|
||||
# Creating lock file
|
||||
touch "${FILE}"
|
||||
|
|
Loading…
Reference in New Issue