]> git.plutz.net Git - cgilite/commitdiff
bugfix: allow positive return of LOCK()
authorPaul Hänsch <paul@plutz.net>
Sun, 15 Jul 2018 15:25:35 +0000 (17:25 +0200)
committerPaul Hänsch <paul@plutz.net>
Sun, 15 Jul 2018 15:25:35 +0000 (17:25 +0200)
storage.sh

index 1d8764be745b1c0168a7b56302fc42340be272de..8939fdc7c83fcb9bdde8cc1738ed1e4baabc3963 100755 (executable)
@@ -42,7 +42,7 @@ LOCK(){
     sleep 1
   done
   printf '%i\n' $$ >"${lock}/pid"
     sleep 1
   done
   printf '%i\n' $$ >"${lock}/pid"
-  return 1
+  return 0
 }
 
 RELEASE(){
 }
 
 RELEASE(){
@@ -54,6 +54,7 @@ RELEASE(){
       printf '%i\n' $$ >"${lock}/pid"
       return 1
     fi
       printf '%i\n' $$ >"${lock}/pid"
       return 1
     fi
+    return 0
   else
     printf 'Refusing to release foreign lock: %s\n' "$lock" >&2
     return 1
   else
     printf 'Refusing to release foreign lock: %s\n' "$lock" >&2
     return 1