summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 10:10:55 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-19 10:10:55 (GMT)
commit07f9c438f31de7a280e43c4196a32d200ad41fbe (patch)
tree642bd4478a70665df23b83cb7b48770c3020c570 /plugins/runcmd.c
parent47cb10013e6935bb6cdf470925ea5a5f74464646 (diff)
downloadmonitoring-plugins-07f9c438f31de7a280e43c4196a32d200ad41fbe.tar.gz
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