mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-14 19:19:59 -04:00
check_procs: Get rid of HAVE_PROC_PID_EXE
Don't check for /proc/pid/exe at compile time, it could be gone in a build chroot or the like. Checking at runtime (once) is sufficient.
This commit is contained in:
parent
d5677d9b42
commit
0f686d436e
2 changed files with 1 additions and 7 deletions
|
|
@ -1632,12 +1632,6 @@ if test -n "$ac_cv_proc_meminfo"; then
|
|||
EXTRAS="$EXTRAS check_swap"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for /proc/pid/exe])
|
||||
if [readlink /proc/$$/exe > /dev/null 2>&1]; then
|
||||
AC_MSG_RESULT([found])
|
||||
AC_DEFINE(HAVE_PROC_PID_EXE,1,[Define if we have /proc/pid/exe])
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(PATH_TO_DIG,dig)
|
||||
AC_ARG_WITH(dig_command,
|
||||
ACX_HELP_STRING([--with-dig-command=PATH],
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ FILE *ps_input = NULL;
|
|||
|
||||
static int
|
||||
stat_exe (const pid_t pid, struct_stat_t *buf) {
|
||||
#if defined(HAVE_PROC_PID_EXE) && defined(HAVE_SYS_STAT_H)
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
char *path;
|
||||
int ret;
|
||||
xasprintf(&path, "/proc/%d/exe", pid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue