mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-29 18:20:03 -04:00
Will die if signal received from a testCmd
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1364 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
3824f73502
commit
a0f3874676
1 changed files with 6 additions and 3 deletions
|
|
@ -609,10 +609,13 @@ sub testCmd {
|
|||
my $object = $class->new;
|
||||
|
||||
my $output = `$command`;
|
||||
chomp $output;
|
||||
|
||||
$object->output($output);
|
||||
$object->return_code($? >> 8);
|
||||
$_ = $? & 127;
|
||||
if ($_) {
|
||||
die "Got signal $_ for command $command";
|
||||
}
|
||||
chomp $output;
|
||||
$object->output($output);
|
||||
|
||||
if ($ENV{'NPTEST_DEBUG'}) {
|
||||
my ($pkg, $file, $line) = caller(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue