]> git.corax.cc Git - toolbox/commit
include/sem: Allow semaphores to be created in arbitrary locations
authorMatthias Kruk <m@m10k.eu>
Mon, 12 Apr 2021 23:45:07 +0000 (08:45 +0900)
committerMatthias Kruk <m@m10k.eu>
Mon, 12 Apr 2021 23:45:07 +0000 (08:45 +0900)
commit91c6ff7fd7dc0e71673ec079b83007df2eb38932
tree85fb4bf0a204a17a395595e9500f0fe48ff9fc9d
parentc0c7af87bbc049193f678cd4c8c2b057d66ce2ea
include/sem: Allow semaphores to be created in arbitrary locations

The current implementation cannot be used to created semaphores outside
of $TOOLBOX_HOME/sem. This makes it impossible to share semaphores with
scripts that are executed as a different user.
This commit changes the semaphore implementation so that only semaphore
names that don't contain slashes will be created in $TOOLBOX_HOME/sem.
include/sem.sh