summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.h
diff options
context:
space:
mode:
authorDennis <13968467+Decstasy@users.noreply.github.com>2025-11-25 15:02:52 +0100
committerGitHub <noreply@github.com>2025-11-25 15:02:52 +0100
commitcedfc166d42f4e89dddc1caa44e0655157d35a0a (patch)
treeee980d8df72bc9611099f6a997274831098d4175 /lib/utils_cmd.h
parent978343ed03d3327597fa3317901f1c1741a7e3c4 (diff)
parent3657197cf77ca78f6e2d003a71d48dc5d4dc45ae (diff)
downloadmonitoring-plugins-cedfc166d42f4e89dddc1caa44e0655157d35a0a.tar.gz
Merge branch 'master' into check_dig_flags_feature
Diffstat (limited to 'lib/utils_cmd.h')
-rw-r--r--lib/utils_cmd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h
index 3672cdc9..d3a8f14f 100644
--- a/lib/utils_cmd.h
+++ b/lib/utils_cmd.h
@@ -13,7 +13,6 @@ typedef struct {
13 char *buf; /* output buffer */ 13 char *buf; /* output buffer */
14 size_t buflen; /* output buffer content length */ 14 size_t buflen; /* output buffer content length */
15 char **line; /* array of lines (points to buf) */ 15 char **line; /* array of lines (points to buf) */
16 size_t *lens; /* string lengths */
17 size_t lines; /* lines of output */ 16 size_t lines; /* lines of output */
18} output; 17} output;
19 18
@@ -22,6 +21,15 @@ int cmd_run(const char *, output *, output *, int);
22int cmd_run_array(char *const *, output *, output *, int); 21int cmd_run_array(char *const *, output *, output *, int);
23int cmd_file_read(const char *, output *, int); 22int cmd_file_read(const char *, output *, int);
24 23
24typedef struct {
25 int error_code;
26 int cmd_error_code;
27 output stdout;
28 output stderr;
29} cmd_run_result;
30cmd_run_result cmd_run2(const char *cmd, int flags);
31cmd_run_result cmd_run_array2(char * const *cmd, int flags);
32
25/* only multi-threaded plugins need to bother with this */ 33/* only multi-threaded plugins need to bother with this */
26void cmd_init(void); 34void cmd_init(void);
27#define CMD_INIT cmd_init() 35#define CMD_INIT cmd_init()