summaryrefslogtreecommitdiffstats
path: root/src/mutex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex.sh')
-rw-r--r--src/mutex.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mutex.sh b/src/mutex.sh
index cd4a365..ab9824c 100644
--- a/src/mutex.sh
+++ b/src/mutex.sh
@@ -23,6 +23,8 @@ mutex_trylock()
local mutex="${1}"
(set -C; printf '%d\n' "${$}" >"${mutex}") 2>/dev/null
+
+ return ${?}
}
mutex_timedlock()
@@ -51,4 +53,6 @@ mutex_is_unlockable()
local mutex="${1}"
[ "x$(cat "${mutex}" 2>/dev/null)" = "x${$}" ]
+
+ return ${?}
}