check_procs: filter out self by /proc/pid/exe
commitce7a99789ddb3c6047135eef87ebdb695673612d
authorSebastian Schmidt <sschmidt@interhyp.de>
Wed, 7 Nov 2012 17:56:02 +0000 (7 18:56 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 18 Aug 2013 10:59:57 +0000 (18 12:59 +0200)
tree74324c328ebe170414b0ebd9606ba08d6a6b054e
parentf3dbc2ec871da22028969540424a63ff51404cfd
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.
configure.in
plugins/check_procs.c