From 40e562a93a293b65b85d7980c871219d8218ec6a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 9 Jun 2017 14:53:53 +0200 Subject: introduce lock file for package database --- bin/return-assignment | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bin') diff --git a/bin/return-assignment b/bin/return-assignment index b217409..04648ca 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -22,13 +22,19 @@ # Create a lock file and a trap. exec 9> "${build_list_lock_file}" +exec 8> "${package_database_lock_file}" if ! flock -n 9; then >&2 echo 'come back (shortly) later - I cannot lock build list.' exit 1 fi +if ! flock -n 8; then + >&2 echo 'come back (shortly) later - I cannot lock package database.' + exit 1 +fi function clean_up_lock_file { rm -f "${build_list_lock_file}" + rm -f "${package_database_lock_file}" } trap clean_up_lock_file EXIT -- cgit v1.2.3-54-g00ecf