in reply to Mechanism for ensuring only one instance of a Perl script can only run?
Two comments:
Your solution suffers from a race condition, and could allow two instances of the script to run at the same time.
A couple of people mentioned using a non-blocking flock. That's a great simple solution, but it comes with a major caveat: It's doesn't work or it's unreliable on some file systems (notably NFS). Also, I don't know if it'll work on Windows.
|
|---|