From 14b79382d21c97a8f876969c582e03a4cb78912f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 11 Jun 2023 18:28:58 +0200 Subject: make ping-build-master lock on any file given on the command line --- bin/build-packages | 2 +- bin/ping-to-master | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/build-packages b/bin/build-packages index ef24b5e..76c1b73 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -367,7 +367,7 @@ while [ "${count}" -ne 0 ] && \ >&2 echo 'ERROR: Cannot lock ping-to-master - this should not happen.' exit 2 fi - "${base_dir}/bin/ping-to-master" "$$" "${tmp_dir}" & + "${base_dir}/bin/ping-to-master" "$$" "${tmp_dir}" "${work_dir}/ping-build-master.lock" & fi success=false diff --git a/bin/ping-to-master b/bin/ping-to-master index 0b72935..b7b1eee 100755 --- a/bin/ping-to-master +++ b/bin/ping-to-master @@ -14,8 +14,9 @@ parent_pid="$1" parent_tmp_dir="$2" +lock_file="$3" -exec 9> "${work_dir}/ping-build-master.lock" +exec 9> "${lock_file}" while kill -0 "${parent_pid}" && \ [ -f "${parent_tmp_dir}/.ping-build-master" ]; do -- cgit v1.2.3-54-g00ecf