|
|
| "be consistent" | |
| PerlMonks |
Re^5: self detecting scriptby mpeters (Chaplain) |
| on Sep 15, 2005 at 18:01 UTC ( [id://492446]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Well, if you just rely on the prescence of the lock file then you open yourself up to a race condition. If you flock it, then it's prescence after the fact doesn't really matter does it? The next run of the script will be able to grab the same lock and write it's pid there if it needs to.
-- More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||