search for: davidpashley

Displaying 1 result from an estimated 1 matches for "davidpashley".

2011 Jul 13
1
Lock files in scripts
I was about to ask here how to do proper locking in a bash script when I found a page that addressed my objections to the race conditions I was finding in most sample code: <http://www.davidpashley.com/articles/writing-robust-shell-scripts.html> I just wanted to pass on the link to anyone else that needs this. One thing not addressed is how to deal with an orphaned lock file (eg. if the system crashes with the lock held). He stores the PID in the lock file, so one could look up the mat...