diff options
Diffstat (limited to 'web/attachments/119194-check_procs.patch')
-rw-r--r-- | web/attachments/119194-check_procs.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/web/attachments/119194-check_procs.patch b/web/attachments/119194-check_procs.patch new file mode 100644 index 0000000..3510483 --- /dev/null +++ b/web/attachments/119194-check_procs.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | *** check_procs.c.orig Wed Dec 29 16:41:39 2004 | ||
2 | --- check_procs.c Tue Feb 8 10:42:34 2005 | ||
3 | *************** | ||
4 | *** 187,197 **** | ||
5 | procppid, procpcpu, procstat, | ||
6 | procetime, procprog, procargs); | ||
7 | |||
8 | ! /* Ignore self */ | ||
9 | if (strcmp (procprog, progname) == 0) { | ||
10 | continue; | ||
11 | } | ||
12 | |||
13 | if ((options & STAT) && (strstr (statopts, procstat))) | ||
14 | resultsum |= STAT; | ||
15 | if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) | ||
16 | --- 187,204 ---- | ||
17 | procppid, procpcpu, procstat, | ||
18 | procetime, procprog, procargs); | ||
19 | |||
20 | ! /* Ignore command line self */ | ||
21 | ! | ||
22 | if (strcmp (procprog, progname) == 0) { | ||
23 | continue; | ||
24 | } | ||
25 | |||
26 | + /* Ignore self in process arguments to prevent problems when | ||
27 | + check_procs is called via shell (i.e. check_nrpe) */ | ||
28 | + | ||
29 | + if (strstr (procargs, progname) != NULL) | ||
30 | + continue; | ||
31 | + | ||
32 | if ((options & STAT) && (strstr (statopts, procstat))) | ||
33 | resultsum |= STAT; | ||
34 | if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) | ||