Changeset b301ee2e91d95abca805621d0cd0543f7fc7a8ca

Show
Ignore:
Timestamp:
06/08/09 18:29:05 (10 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1244485745 +0000
git-parent:

[fae118a128cdb72a473dd52dbd64101f9a9b4990]

git-author:
Mark Harrison <mark@omniti.com> 1244485745 +0000
Message:

Fix for check timeouts in the case where there is a problem with the check

git-svn-id: https://labs.omniti.com/resmon/trunk@196 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • resmon

    rd606430 rb301ee2  
    133133      # Otherwise, run the check 
    134134      if (!$check_rv) { 
     135        local $SIG{ALRM} = sub { die "alarm\n" }; 
     136        my $timeout = $monobj->{'check_timeout'} || $config->{'timeout'}; 
     137        alarm($timeout); 
    135138        eval { 
    136           local $SIG{ALRM} = sub { die "alarm\n" }; 
    137           my $timeout = $monobj->{'check_timeout'} || $config->{'timeout'}; 
    138           alarm($timeout); 
    139139          if($coderef) { 
    140140            ($check_rv, $check_mess) = $coderef->($monobj); 
     
    142142            ($check_rv, $check_mess) = $monobj->handler(); 
    143143          } 
    144           alarm 0; 
    145144        }; 
     145        alarm 0; 
    146146        # Store the last status for use by fresh_status_msg later 
    147147        # Also converts old style status messages