in reply to How do I determine if my script is already running?
# Make sure there is not another copy of this script running my $lockfile = '/var/run/proggie_check'; open (LOCK, ">$lockfile") || die; # No rights? - die flock(LOCK,2|4) || die; # Lock it, no waitin' or die. # --- We are the only copy around ---
|
|---|