diff options
Diffstat (limited to 'plugins-scripts')
| -rwxr-xr-x | plugins-scripts/check_disk_smb.pl | 7 | ||||
| -rw-r--r-- | plugins-scripts/t/utils.t | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins-scripts/check_disk_smb.pl b/plugins-scripts/check_disk_smb.pl index 98992268..28c49e84 100755 --- a/plugins-scripts/check_disk_smb.pl +++ b/plugins-scripts/check_disk_smb.pl | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | # | 19 | # |
| 20 | 20 | ||
| 21 | require 5.004; | 21 | require 5.004; |
| 22 | use POSIX; | 22 | use POSIX qw(setsid); |
| 23 | use strict; | 23 | use strict; |
| 24 | use Getopt::Long; | 24 | use Getopt::Long; |
| 25 | use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose); | 25 | use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose); |
| @@ -28,6 +28,9 @@ use FindBin; | |||
| 28 | use lib "$FindBin::Bin"; | 28 | use lib "$FindBin::Bin"; |
| 29 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); | 29 | use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); |
| 30 | 30 | ||
| 31 | # make us session leader which makes all childs exit if we do | ||
| 32 | setsid; | ||
| 33 | |||
| 31 | sub print_help (); | 34 | sub print_help (); |
| 32 | sub print_usage (); | 35 | sub print_usage (); |
| 33 | 36 | ||
| @@ -175,6 +178,8 @@ my @lines = undef; | |||
| 175 | # Just in case of problems, let's not hang the monitoring system | 178 | # Just in case of problems, let's not hang the monitoring system |
| 176 | $SIG{'ALRM'} = sub { | 179 | $SIG{'ALRM'} = sub { |
| 177 | print "No Answer from Client\n"; | 180 | print "No Answer from Client\n"; |
| 181 | $SIG{'INT'} = 'IGNORE'; | ||
| 182 | kill(-2, $$); | ||
| 178 | exit $ERRORS{"UNKNOWN"}; | 183 | exit $ERRORS{"UNKNOWN"}; |
| 179 | }; | 184 | }; |
| 180 | alarm($TIMEOUT); | 185 | alarm($TIMEOUT); |
diff --git a/plugins-scripts/t/utils.t b/plugins-scripts/t/utils.t index 9c2c5695..5c231791 100644 --- a/plugins-scripts/t/utils.t +++ b/plugins-scripts/t/utils.t | |||
| @@ -10,6 +10,7 @@ use strict; | |||
| 10 | use Test::More; | 10 | use Test::More; |
| 11 | use NPTest; | 11 | use NPTest; |
| 12 | 12 | ||
| 13 | use lib "."; | ||
| 13 | use lib ".."; | 14 | use lib ".."; |
| 14 | use utils; | 15 | use utils; |
| 15 | 16 | ||
