Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #wait for some program to clear a lock before doing stuff
- while [ -f /var/run/example.lock ]; do
- sleep 1
- done
- #do stuff
- #/bin/sh
- inotifywait -e delete_self /var/run/example.lock
- #do stuff
- take the lock
- use the resource
- release the lock
Add Comment
Please, Sign In to add comment