summaryrefslogtreecommitdiffstats
path: root/plugins/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/popen.c')
-rw-r--r--plugins/popen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/popen.c b/plugins/popen.c
index 04eb388..062cf27 100644
--- a/plugins/popen.c
+++ b/plugins/popen.c
@@ -243,8 +243,12 @@ static int openmax = 0;
243void 243void
244popen_timeout_alarm_handler (int signo) 244popen_timeout_alarm_handler (int signo)
245{ 245{
246 int fh;
246 if (signo == SIGALRM) { 247 if (signo == SIGALRM) {
247 kill (childpid[fileno (child_process)], SIGKILL); 248 fh=fileno (child_process);
249 if(fh >= 0){
250 kill (childpid[fh], SIGKILL);
251 }
248 printf (_("CRITICAL - Plugin timed out after %d seconds\n"), 252 printf (_("CRITICAL - Plugin timed out after %d seconds\n"),
249 timeout_interval); 253 timeout_interval);
250 exit (STATE_CRITICAL); 254 exit (STATE_CRITICAL);