Keyway: A simple lock library
blog.strieber.org
blog.strieber.org
acquire_lock_for() {
if not_locked $1; then
lock_log "Creating $1 lock."
touch "$LOCK_DIR/$1".lock
check_execution "acquire lock"
fi
}
what if another process creates lock file between the `if not_locked` and `touch` lines?