summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pm/functions.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/pm/functions.in b/pm/functions.in
index b72a449..bd0705c 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -28,7 +28,7 @@ spin_lock()
# $2 = optional timeout
local elapsed=0
while ! try_lock $1; do
- [ "x$2" != "x" ] && [ $(( $elapsed = $2 )) -ne 0 ] && return 1
+ [ "x$2" != "x" ] && [ $(( $elapsed == $2 )) -ne 0 ] && return 1
elapsed=$(($elapsed + 1))
sleep 1;
done