X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=storage.sh;h=f5a0ac6c58feb4de7ae8285b32f28e4b4c47780d;hp=8939fdc7c83fcb9bdde8cc1738ed1e4baabc3963;hb=813580b4cdebfe5161ef01bcbd126405c3162d7a;hpb=40c5373a1f5eb710635f340e88c31f8c9dfedfeb diff --git a/storage.sh b/storage.sh index 8939fdc..f5a0ac6 100755 --- a/storage.sh +++ b/storage.sh @@ -28,7 +28,7 @@ LOCK(){ return 1 fi - while ! mkdir "$lock"; do + while ! mkdir "$lock" 2>&-; do block="$(cat "$lock/pid" || printf 1)" if ! { ps -eo pid |grep -qwF "$block"; }; then printf 'Overriding stale lock: %s\n' "$lock" >&2