summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-12-03 20:00:11 +0100
committerGitHub <noreply@github.com>2023-12-03 20:00:11 +0100
commitc43d2e9959c1f2d594801bc5d61db7c96126978f (patch)
treece6a5340b72bc884e5a8ac4bda9c49a23cd7cff6
parentc2ddda30e043bb62b30ca5d25dba8379697b6340 (diff)
parent897e4a840929285b0a29237e12f4aa9b702f41ce (diff)
downloadmonitoring-plugins-c43d2e9959c1f2d594801bc5d61db7c96126978f.tar.gz
Merge pull request #1968 from shartge/improve-check_procs
check_procs: ignore our own children
-rw-r--r--plugins/check_procs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 6e3feaec..3c98866f 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -255,6 +255,13 @@ main (int argc, char **argv)
255 continue; 255 continue;
256 } 256 }
257 257
258 /* Ignore our own children */
259 if (procppid == mypid) {
260 if (verbose >= 3)
261 printf("not considering - is our child\n");
262 continue;
263 }
264
258 /* Ignore excluded processes by name */ 265 /* Ignore excluded processes by name */
259 if(options & EXCLUDE_PROGS) { 266 if(options & EXCLUDE_PROGS) {
260 int found = 0; 267 int found = 0;