fix some semaphore wait semantics (race condition deadlock and error checking)
[musl] / lib /
drwxr-xr-x   ..
-rw-r--r-- 0 empty