From 1c26d16709872f97dfce4615a31e472fa0afb3fb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 27 Oct 2017 15:35:58 +0200 Subject: add shared lock for sanity-check --- bin/return-assignment | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bin/return-assignment') diff --git a/bin/return-assignment b/bin/return-assignment index c99bc22..1a27b9f 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -32,6 +32,12 @@ if ! flock -n 9; then exit 1 fi +exec 8> "${sanity_check_lock_file}" +if ! flock -s -n 8; then + >&2 echo 'come back (shortly) later - sanity-check running.' + exit 1 +fi + clean_up_lock_file() { rm -f "${build_list_lock_file}" } @@ -106,8 +112,8 @@ fi # so we also need a lock on the package database -exec 8> "${package_database_lock_file}" -if ! flock -n 8; then +exec 7> "${package_database_lock_file}" +if ! flock -n 7; then >&2 echo 'come back (shortly) later - I cannot lock package database.' exit 1 fi -- cgit v1.2.3-54-g00ecf