nagios-plugins/nagios-plugins — pull request #60 by yath (2013-08-18 10:57:17+00:00)
Title: check_procs: Use /proc/pid/exe, when available, instead of getpid() for filtering out self

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.

(was https://github.com/nagios-plugins/nagios-plugins/pull/25)