summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:48:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:48:22 +0000
commit7373ce3d6988706388f136e1c06afd20a3e8d5be (patch)
treee9ae5af7d102667e5706187646db45de8238e8c4 /plugins/runcmd.h
parentInitial commit. (diff)
downloadmonitoring-plugins-7373ce3d6988706388f136e1c06afd20a3e8d5be.tar.xz
monitoring-plugins-7373ce3d6988706388f136e1c06afd20a3e8d5be.zip
Adding upstream version 2.3.5.upstream/2.3.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/runcmd.h')
-rw-r--r--plugins/runcmd.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/runcmd.h b/plugins/runcmd.h
new file mode 100644
index 0000000..2dcdadf
--- /dev/null
+++ b/plugins/runcmd.h
@@ -0,0 +1,43 @@
+/****************************************************************************
+*
+* License: GPL
+* Copyright (c) 2005 Monitoring Plugins Development Team
+* Author: Andreas Ericsson <ae@op5.se>
+*
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*
+*
+*****************************************************************************/
+
+#ifndef NAGIOSPLUG_RUNCMD_H
+#define NAGIOSPLUG_RUNCMD_H
+
+#include "common.h"
+#include "utils_cmd.h" /* for the "output" type */
+
+/** prototypes **/
+int np_runcmd(const char *, output *, output *, int);
+void runcmd_timeout_alarm_handler(int)
+ __attribute__((__noreturn__));
+
+/* only multi-threaded plugins need to bother with this */
+void np_runcmd_init(void);
+#define NP_RUNCMD_INIT np_runcmd_init()
+
+/* possible flags for np_runcmd()'s fourth argument */
+#define RUNCMD_NO_ARRAYS 0x01 /* don't populate arrays at all */
+#define RUNCMD_NO_ASSOC 0x02 /* output.line won't point to buf */
+
+#endif /* NAGIOSPLUG_RUNCMD_H */