Keep It Simple, Stupid | |
PerlMonks |
Re: Mechanism for ensuring only one instance of a Perl script can only run?by Corion (Patriarch) |
on Dec 02, 2022 at 16:43 UTC ( [id://11148503]=note: print w/replies, xml ) | Need Help?? |
See the highlander script. The basic idea is to flock() your program script. That way, the lock is automatically released once your program ends (or crashes).
In Section
Seekers of Perl Wisdom
|
|