diff options
| author | Sebastian Schmidt <sschmidt@interhyp.de> | 2012-11-07 18:56:02 +0100 |
|---|---|---|
| committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-18 12:59:57 +0200 |
| commit | ce7a99789ddb3c6047135eef87ebdb695673612d (patch) | |
| tree | 74324c328ebe170414b0ebd9606ba08d6a6b054e /configure.in | |
| parent | f3dbc2ec871da22028969540424a63ff51404cfd (diff) | |
| download | monitoring-plugins-ce7a99789ddb3c6047135eef87ebdb695673612d.tar.gz | |
check_procs: filter out self by /proc/pid/exe
Make check_procs filter out itself in the process list by comparing the
file pointed to by /proc/pid/exe. On platforms where this is not
available or when check_procs is passed the -T flag, the old behaviour
(check whether PID equals getpid()) is retained.
This fixes some false alarms when e.g. Nagios has, for whatever reasons,
some backlog of checks to run and check_procs with -a is called more
than once in a short time, matching its sister process.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 43fe4ade..7efcb0f9 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1632,6 +1632,12 @@ if test -n "$ac_cv_proc_meminfo"; then | |||
| 1632 | EXTRAS="$EXTRAS check_swap" | 1632 | EXTRAS="$EXTRAS check_swap" |
| 1633 | fi | 1633 | fi |
| 1634 | 1634 | ||
| 1635 | AC_MSG_CHECKING([for /proc/pid/exe]) | ||
| 1636 | if [readlink /proc/$$/exe > /dev/null 2>&1]; then | ||
| 1637 | AC_MSG_RESULT([found]) | ||
| 1638 | AC_DEFINE(HAVE_PROC_PID_EXE,1,[Define if we have /proc/pid/exe]) | ||
| 1639 | fi | ||
| 1640 | |||
| 1635 | AC_PATH_PROG(PATH_TO_DIG,dig) | 1641 | AC_PATH_PROG(PATH_TO_DIG,dig) |
| 1636 | AC_ARG_WITH(dig_command, | 1642 | AC_ARG_WITH(dig_command, |
| 1637 | ACX_HELP_STRING([--with-dig-command=PATH], | 1643 | ACX_HELP_STRING([--with-dig-command=PATH], |
