mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-22 14:46:57 -04:00
Place _cmd_pids in object not header to avoid unsused variables
This commit is contained in:
parent
7f460dd60a
commit
a3029c5a2e
2 changed files with 10 additions and 9 deletions
|
|
@ -42,6 +42,16 @@
|
|||
#include "common.h"
|
||||
#include "utils.h"
|
||||
#include "utils_cmd.h"
|
||||
/* This variable must be global, since there's no way the caller
|
||||
* can forcibly slay a dead or ungainly running program otherwise.
|
||||
* Multithreading apps and plugins can initialize it (via CMD_INIT)
|
||||
* in an async safe manner PRIOR to calling cmd_run() or cmd_run_array()
|
||||
* for the first time.
|
||||
*
|
||||
* The check for initialized values is atomic and can
|
||||
* occur in any number of threads simultaneously. */
|
||||
static pid_t *_cmd_pids = NULL;
|
||||
|
||||
#include "utils_base.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,6 @@ void cmd_init (void);
|
|||
#define CMD_NO_ARRAYS 0x01 /* don't populate arrays at all */
|
||||
#define CMD_NO_ASSOC 0x02 /* output.line won't point to buf */
|
||||
|
||||
/* This variable must be global, since there's no way the caller
|
||||
* can forcibly slay a dead or ungainly running program otherwise.
|
||||
* Multithreading apps and plugins can initialize it (via CMD_INIT)
|
||||
* in an async safe manner PRIOR to calling cmd_run() or cmd_run_array()
|
||||
* for the first time.
|
||||
*
|
||||
* The check for initialized values is atomic and can
|
||||
* occur in any number of threads simultaneously. */
|
||||
static pid_t *_cmd_pids = NULL;
|
||||
|
||||
RETSIGTYPE timeout_alarm_handler (int);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue