X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=8d737cea0354e2490bd801c350fdac63a7dbf650;hb=20d15cfd26b23508242abcead906207bf26175d0;hp=b9a7365effe5ab8ef8edd0ec9aba7d3645bb1c47;hpb=7ae0eb4b33b50a9da921221264fbcc69e85eb27a;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)