]> git.corax.cc Git - toolbox/commit
include/mutex: Make mutex_lock() fail if the path does not exist
authorMatthias Kruk <m@m10k.eu>
Tue, 20 Apr 2021 23:24:39 +0000 (08:24 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 20 Apr 2021 23:24:39 +0000 (08:24 +0900)
commit7af7283f56eb96d5604bc8d7648639ab935258ad
tree3d4143c2c1c0a97ab3a7eda1d2585878eea15b35
parent36a9b8d3c0cae10b66aa710133c871dc7d4c9be2
include/mutex: Make mutex_lock() fail if the path does not exist

The mutex_lock() function does not check if the path of the mutex
exists, causing it to wait forever if an invalid path was passed.
This commit makes mutex_lock() fail if it could not inotifywait on
the directory that contains the mutex.
include/mutex.sh