in reply to Re: Ensuring only one copy of a perl script is running at a time
in thread Ensuring only one copy of a perl script is running at a time
What about?
$cmd = 'ps -eaf | grep -c "\< '."$0".'\>"'; chomp($instances = `$cmd`); if($instances > 1) exit;
|
---|
In Section
Seekers of Perl Wisdom