Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use LockFile::Simple;
- use Data::Dumper;
- my $lock = "lock";
- my $lockmgr = LockFile::Simple->make( -hold => 60 );
- my $ret = $lockmgr->trylock( $lock ) || die "can't lock $lock\n";
- print Dumper($ret);
Add Comment
Please, Sign In to add comment