summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-29 10:09:00 (GMT)
committerGitHub <noreply@github.com>2023-10-29 10:09:00 (GMT)
commit77e38ac1c025b8431d1834a2c1059f9677c78ab1 (patch)
treeaa8dc016303530e56155826f355cb7e3c3a4ee94 /plugins/runcmd.c
parent2eea6bb2a04bbfb169bac5f0f7c319f998e8ab87 (diff)
parenteead88edda047843b911afd7b63e7decfee306ce (diff)
downloadmonitoring-plugins-77e38ac1c025b8431d1834a2c1059f9677c78ab1.tar.gz
Merge pull request #1953 from RincewindsHat/compiler_warnings-sign-compare
Fixes for -Wsign-compare
Diffstat (limited to 'plugins/runcmd.c')
-rw-r--r--plugins/runcmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index 4f3e349..32fd6b9 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -240,13 +240,12 @@ np_runcmd_close(int fd)
240void 240void
241runcmd_timeout_alarm_handler (int signo) 241runcmd_timeout_alarm_handler (int signo)
242{ 242{
243 size_t i;
244 243
245 if (signo == SIGALRM) 244 if (signo == SIGALRM)
246 puts(_("CRITICAL - Plugin timed out while executing system call")); 245 puts(_("CRITICAL - Plugin timed out while executing system call"));
247 246
248 long maxfd = mp_open_max(); 247 long maxfd = mp_open_max();
249 if(np_pids) for(i = 0; i < maxfd; i++) { 248 if(np_pids) for(long int i = 0; i < maxfd; i++) {
250 if(np_pids[i] != 0) kill(np_pids[i], SIGKILL); 249 if(np_pids[i] != 0) kill(np_pids[i], SIGKILL);
251 } 250 }
252 251