summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-09-23 09:33:32 +0200
committerGitHub <noreply@github.com>2023-09-23 09:33:32 +0200
commitfe718dec117a7adb8a7107a4137a86c79b54d15f (patch)
tree81d1fc6efe0f3822f9a0ed89a6fdc28c23bda90a /lib/utils_cmd.c
parent7f460dd60a73a6e20d03a2312e8bb8fa80e5cdf6 (diff)
parenta3029c5a2e71d4aa4955901f282d3f4669acf97d (diff)
downloadmonitoring-plugins-fe718de.tar.gz
Merge pull request #1925 from RincewindsHat/compiler_warnings_4_2
Place _cmd_pids in object not header to avoid unsused variables
Diffstat (limited to 'lib/utils_cmd.c')
-rw-r--r--lib/utils_cmd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index 34fb3909..883f1ec1 100644
--- a/lib/utils_cmd.c
+++ b/lib/utils_cmd.c
@@ -42,6 +42,16 @@
42#include "common.h" 42#include "common.h"
43#include "utils.h" 43#include "utils.h"
44#include "utils_cmd.h" 44#include "utils_cmd.h"
45/* This variable must be global, since there's no way the caller
46 * can forcibly slay a dead or ungainly running program otherwise.
47 * Multithreading apps and plugins can initialize it (via CMD_INIT)
48 * in an async safe manner PRIOR to calling cmd_run() or cmd_run_array()
49 * for the first time.
50 *
51 * The check for initialized values is atomic and can
52 * occur in any number of threads simultaneously. */
53static pid_t *_cmd_pids = NULL;
54
45#include "utils_base.h" 55#include "utils_base.h"
46#include <fcntl.h> 56#include <fcntl.h>
47 57