Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-06-11 18:28:58 +0200
committerErich Eckner <git@eckner.net>2023-06-11 18:29:07 +0200
commit14b79382d21c97a8f876969c582e03a4cb78912f (patch)
tree2251283556efda1a50edb824d5064b99daf95f5f /bin
parent4dc67340ac9e397a9f54fa744976790ae7c61454 (diff)
make ping-build-master lock on any file given on the command line
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages2
-rwxr-xr-xbin/ping-to-master3
2 files changed, 3 insertions, 2 deletions
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