From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../209675-check_procs.c-1.4.5-zombies-patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 web/attachments/209675-check_procs.c-1.4.5-zombies-patch (limited to 'web/attachments/209675-check_procs.c-1.4.5-zombies-patch') diff --git a/web/attachments/209675-check_procs.c-1.4.5-zombies-patch b/web/attachments/209675-check_procs.c-1.4.5-zombies-patch new file mode 100644 index 0000000..6923bf5 --- /dev/null +++ b/web/attachments/209675-check_procs.c-1.4.5-zombies-patch @@ -0,0 +1,26 @@ +diff -Naur nagios-plugins-1.4.5/plugins/check_procs.c nagios-plugins-1.4.5-patched/plugins/check_procs.c +--- nagios-plugins-1.4.5/plugins/check_procs.c 2006-10-23 00:03:31.000000000 +0200 ++++ nagios-plugins-1.4.5-patched/plugins/check_procs.c 2007-01-04 12:00:46.512560576 +0100 +@@ -181,6 +181,7 @@ + strcpy (procprog, ""); + asprintf (&procargs, "%s", ""); + ++ pos = 0; + cols = sscanf (input_line, PS_FORMAT, PS_VARLIST); + + /* Zombie processes do not give a procprog command */ +@@ -189,8 +190,12 @@ + } + if ( cols >= expected_cols ) { + resultsum = 0; +- asprintf (&procargs, "%s", input_line + pos); +- strip (procargs); ++ if (strstr(procstat, zombie)) { ++ procargs = ""; ++ } else { ++ asprintf (&procargs, "%s", input_line + pos); ++ strip (procargs); ++ } + + /* Some ps return full pathname for command. This removes path */ + procprog = base_name(procprog); -- cgit v1.2.3-74-g34f1