summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00f9279)
raw | patch | inline | side by side (parent: 00f9279)
author | Antonio Russo <antonio.e.russo@gmail.com> | |
Tue, 16 Feb 2016 19:22:48 +0000 (11:22 -0800) | ||
committer | Antonio Russo <antonio.e.russo@gmail.com> | |
Tue, 16 Feb 2016 19:33:48 +0000 (11:33 -0800) |
exec plugins are never supposed to receive responses
to putval commands. These responses are instead sent
to STDOUT, which is often attached to /dev/null.
Newer init systems, such as systemd, instead log
these responses.
This patch preserves the expected behavior by suppressing
the response if and only if the destination is STDOUT.
to putval commands. These responses are instead sent
to STDOUT, which is often attached to /dev/null.
Newer init systems, such as systemd, instead log
these responses.
This patch preserves the expected behavior by suppressing
the response if and only if the destination is STDOUT.
src/utils_cmd_putval.c | patch | blob | history |
diff --git a/src/utils_cmd_putval.c b/src/utils_cmd_putval.c
index 7b0258c6796a295d0aa1da715d07bf654eea7f40..7b6a39d7fab1307692d8703adf80a5b0e795419d 100644 (file)
--- a/src/utils_cmd_putval.c
+++ b/src/utils_cmd_putval.c
} /* while (*buffer != 0) */
/* Done parsing the options. */
- print_to_socket (fh, "0 Success: %i %s been dispatched.\n",
+ if (fh!=stdout)
+ print_to_socket (fh, "0 Success: %i %s been dispatched.\n",
values_submitted,
(values_submitted == 1) ? "value has" : "values have");