use LockFile::Simple qw(lock trylock unlock); $lockmgr = LockFile::Simple->make(-format => '%f.lck', -max => 20, -delay => 1, -stale => 1); # first program to get the lock the file gets the chance to run it + if($lockmgr->trylock("$eventsLogFile")){ my @bytes= split(//, $serial_data); $lockmgr->unlock("$eventsLogFile"); }
In reply to Re: Re: Order of flock and open
by mdog
in thread Order of flock and open
by svsingh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |