summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSebastian Schmidt <sschmidt@interhyp.de>2012-11-07 17:56:02 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-18 10:59:57 (GMT)
commitce7a99789ddb3c6047135eef87ebdb695673612d (patch)
tree74324c328ebe170414b0ebd9606ba08d6a6b054e /configure.in
parentf3dbc2ec871da22028969540424a63ff51404cfd (diff)
downloadmonitoring-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.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 43fe4ad..7efcb0f 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"
1633fi 1633fi
1634 1634
1635AC_MSG_CHECKING([for /proc/pid/exe])
1636if [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])
1639fi
1640
1635AC_PATH_PROG(PATH_TO_DIG,dig) 1641AC_PATH_PROG(PATH_TO_DIG,dig)
1636AC_ARG_WITH(dig_command, 1642AC_ARG_WITH(dig_command,
1637 ACX_HELP_STRING([--with-dig-command=PATH], 1643 ACX_HELP_STRING([--with-dig-command=PATH],