diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-29 15:30:34 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-03-29 15:30:34 +0000 |
commit | a0f387467691292fe62c66e56fbc8476c7ecbb2d (patch) | |
tree | 18a69005950fac466b6d2e25874c7abf66db5a2f /NPTest.pm | |
parent | 3824f7350251d4d10a794b6b9390333dbe567c57 (diff) | |
download | monitoring-plugins-a0f387467691292fe62c66e56fbc8476c7ecbb2d.tar.gz |
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
Diffstat (limited to 'NPTest.pm')
-rw-r--r-- | NPTest.pm | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -609,10 +609,13 @@ sub testCmd { my $object = $class->new; my $output = `$command`; + $object->return_code($? >> 8); + $_ = $? & 127; + if ($_) { + die "Got signal $_ for command $command"; + } chomp $output; - $object->output($output); - $object->return_code($? >> 8); if ($ENV{'NPTEST_DEBUG'}) { my ($pkg, $file, $line) = caller(0); |