summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.h
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.org>2019-02-19 20:42:02 (GMT)
committerGitHub <noreply@github.com>2019-02-19 20:42:02 (GMT)
commit931ed78b5dc062fff33652d87406f1547da5ddbe (patch)
tree9caf8031a15d7f046e77693c4002bf750bfef3d3 /lib/utils_cmd.h
parent2813d08b92d08ba56ec22da00a23fff3a22ed74b (diff)
parent7cafb0e84550035fe671662c293122be975065ca (diff)
downloadmonitoring-plugins-931ed78b5dc062fff33652d87406f1547da5ddbe.tar.gz
Merge pull request #1583 from sni/fix_check_by_ssh_timeout_child_leak
check_by_ssh: fix child process leak on timeouts
Diffstat (limited to 'lib/utils_cmd.h')
-rw-r--r--lib/utils_cmd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h
index ebaf15b..6f3aeb8 100644
--- a/lib/utils_cmd.h
+++ b/lib/utils_cmd.h
@@ -32,4 +32,17 @@ void cmd_init (void);
32#define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */ 32#define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */
33#define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */ 33#define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */
34 34
35/* This variable must be global, since there's no way the caller
36 * can forcibly slay a dead or ungainly running program otherwise.
37 * Multithreading apps and plugins can initialize it (via CMD_INIT)
38 * in an async safe manner PRIOR to calling cmd_run() or cmd_run_array()
39 * for the first time.
40 *
41 * The check for initialized values is atomic and can
42 * occur in any number of threads simultaneously. */
43static pid_t *_cmd_pids = NULL;
44
45RETSIGTYPE timeout_alarm_handler (int);
46
47
35#endif /* _UTILS_CMD_ */ 48#endif /* _UTILS_CMD_ */