From 40c5373a1f5eb710635f340e88c31f8c9dfedfeb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 15 Jul 2018 17:25:35 +0200 Subject: [PATCH] bugfix: allow positive return of LOCK() --- storage.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage.sh b/storage.sh index 1d8764b..8939fdc 100755 --- a/storage.sh +++ b/storage.sh @@ -42,7 +42,7 @@ LOCK(){ sleep 1 done printf '%i\n' $$ >"${lock}/pid" - return 1 + return 0 } RELEASE(){ @@ -54,6 +54,7 @@ RELEASE(){ printf '%i\n' $$ >"${lock}/pid" return 1 fi + return 0 else printf 'Refusing to release foreign lock: %s\n' "$lock" >&2 return 1 -- 2.39.2