diff options
author | Sven Nierlein <sven@nierlein.org> | 2017-09-04 14:56:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 14:56:56 (GMT) |
commit | 9661ee74885834f7b69ab0874c4e65bed0b871c9 (patch) | |
tree | 10c5d787baf88bb9efee725201ac4c244fa8bd52 /plugins/negate.c | |
parent | b3d39e605ef7ce7da056721c4e2e140966be3530 (diff) | |
parent | 6e67b638f8adeec91ff27bc5b82e5c9d755bc79e (diff) | |
download | monitoring-plugins-9661ee74885834f7b69ab0874c4e65bed0b871c9.tar.gz |
Merge pull request #1505 from m-kraus/patch-1
Output plugin's stderr to stderr
Diffstat (limited to 'plugins/negate.c')
-rw-r--r-- | plugins/negate.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/negate.c b/plugins/negate.c index b320e35..50f62d3 100644 --- a/plugins/negate.c +++ b/plugins/negate.c | |||
@@ -86,11 +86,9 @@ main (int argc, char **argv) | |||
86 | result = cmd_run_array (command_line, &chld_out, &chld_err, 0); | 86 | result = cmd_run_array (command_line, &chld_out, &chld_err, 0); |
87 | } | 87 | } |
88 | if (chld_err.lines > 0) { | 88 | if (chld_err.lines > 0) { |
89 | printf ("Error output from command:\n"); | ||
90 | for (i = 0; i < chld_err.lines; i++) { | 89 | for (i = 0; i < chld_err.lines; i++) { |
91 | printf ("%s\n", chld_err.line[i]); | 90 | fprintf (stderr, "%s\n", chld_err.line[i]); |
92 | } | 91 | } |
93 | exit (STATE_WARNING); | ||
94 | } | 92 | } |
95 | 93 | ||
96 | /* Return UNKNOWN or worse if no output is returned */ | 94 | /* Return UNKNOWN or worse if no output is returned */ |