summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-09-17 23:15:59 +0200
committerGitHub <noreply@github.com>2023-09-17 23:15:59 +0200
commitd3e07d2b5734149c1314cb98b48dd1adebd62686 (patch)
treea924b49927ae1925a7e0893d31e0c9c6abd3228e /plugins/runcmd.c
parent495c4c9adfa482303b31cdac7d28adda82d2d2ed (diff)
parent2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff)
downloadmonitoring-plugins-d3e07d2b5734149c1314cb98b48dd1adebd62686.tar.gz
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins/runcmd.c')
-rw-r--r--plugins/runcmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index a7155d27..c1d675d0 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -44,6 +44,8 @@
44# include <sys/wait.h> 44# include <sys/wait.h>
45#endif 45#endif
46 46
47#include "./utils.h"
48
47/** macros **/ 49/** macros **/
48#ifndef WEXITSTATUS 50#ifndef WEXITSTATUS
49# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) 51# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
@@ -203,7 +205,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr)
203 } 205 }
204 206
205 /* parent picks up execution here */ 207 /* parent picks up execution here */
206 /* close childs descriptors in our address space */ 208 /* close children descriptors in our address space */
207 close(pfd[1]); 209 close(pfd[1]);
208 close(pfderr[1]); 210 close(pfderr[1]);
209 211