At most 1 running copy

Erik Hemdal ehemdal at townisp.com
Sat Nov 27 18:29:32 UTC 2004


Perldoc is your friend:

perldoc -f flock   # Gives you the documentation for Perl's flock
perldoc -q lock    # Gives you FAQ information about the ins and outs of 
file locking in Perl.

Perl provides "advisory" locking, so a process is free to ignore the 
lock.  But since the OP was interested in protecting a script from 
itself, this works OK and keeps the Perl script as pure as it can be.

Erik




More information about the users mailing list