X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fexec.c;h=8d737cea0354e2490bd801c350fdac63a7dbf650;hb=08a2128ac248150b50f9c54c9c71f573e54df3c3;hp=b9a7365effe5ab8ef8edd0ec9aba7d3645bb1c47;hpb=443afcad2cbacaca9bb1fd7d9ea790cbeb6ff015;p=collectd.git diff --git a/src/exec.c b/src/exec.c index b9a7365e..8d737cea 100644 --- a/src/exec.c +++ b/src/exec.c @@ -18,11 +18,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: - * Florian octo Forster + * Florian octo Forster * Sebastian Harl * Peter Holik **/ +#define _DEFAULT_SOURCE #define _BSD_SOURCE /* For setgroups */ #include "collectd.h" @@ -338,7 +339,7 @@ static void exec_child (program_list_t *pl, int uid, int gid, int egid) /* {{{ * exit (-1); } - status = execvp (pl->exec, pl->argv); + execvp (pl->exec, pl->argv); ERROR ("exec plugin: Failed to execute ``%s'': %s", pl->exec, sstrerror (errno, errbuf, sizeof (errbuf))); @@ -744,8 +745,8 @@ static void *exec_notification_one (void *arg) /* {{{ */ fprintf (fh, "Severity: %s\n" - "Time: %u\n", - severity, (unsigned int)CDTIME_T_TO_TIME_T(n->time)); + "Time: %.3f\n", + severity, CDTIME_T_TO_DOUBLE (n->time)); /* Print the optional fields */ if (strlen (n->host) > 0)