Changeset 14627 for lang/perl/App-MadEye

Show
Ignore:
Timestamp:
06/26/08 10:59:43 (5 months ago)
Author:
tokuhirom
Message:

use name :)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-MadEye/trunk/lib/App/MadEye/Plugin/Check/Flock.pm

    r8247 r14627  
    44use base qw/App::MadEye::Plugin::Base/; 
    55use LWP::UserAgent; 
     6use Fcntl ":flock"; 
    67 
    78sub check : Hook('check') { 
     
    1011    my $file_name = $self->config->{config}->{file} or die "missing file"; 
    1112    open $self->{lock_fh} , '>' , $file_name or die $!; 
    12     my $status = flock( $self->{lock_fh}, 6 ) or die "cannot get the lock"; 
     13    my $status = flock( $self->{lock_fh}, LOCK_EX|LOCK_NB ) or die "cannot get the lock"; 
    1314} 
    1415