]> git.corax.cc Git - toolbox/commit
include/mutex: Don't write to stderr when mutex_unlock() fails
authorMatthias Kruk <m@m10k.eu>
Sat, 8 Oct 2022 08:24:47 +0000 (17:24 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 8 Oct 2022 08:24:47 +0000 (17:24 +0900)
commitc196803cc8c62d959c8ec9a3c76507a94f7775b1
tree946b9bee5fa51ca33d81e686a7e35219dd1e1322
parente23bde303bc1961a72857dd598665c17f5ed7388
include/mutex: Don't write to stderr when mutex_unlock() fails

When a mutex could not be unlocked, the rm call in mutex_unlock()
writes an error message directly to stderr. However, the function
should only return an error without writing to stderr.

This commit modifies mutex_unlock() so that it does not write to
stderr.
include/mutex.sh