Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Preventing multiple instances

by Anonymous Monk
on Dec 17, 2020 at 09:03 UTC ( #11125330=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use FindBin qw($Bin $Script);
    use Fcntl ':flock';
    
    open my $fh, '>>', "$Bin/$Script" or die "open(>>$Bin/$Script): $!";
    flock $fh, LOCK_EX|LOCK_NB or die "Another copy seems to be running";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11125330]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2021-05-12 03:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (124 votes). Check out past polls.

    Notices?