return (0);
} /* int exec_config }}} */
+static void set_environment (void) /* {{{ */
+{
+ char buffer[1024];
+
+ ssnprintf (buffer, sizeof (buffer), "%i", interval_g);
+ setenv ("COLLECTD_INTERVAL", buffer, /* overwrite = */ 1);
+
+ ssnprintf (buffer, sizeof (buffer), "%s", hostname_g);
+ setenv ("COLLECTD_HOSTNAME", buffer, /* overwrite = */ 1);
+} /* }}} void set_environment */
+
static void exec_child (program_list_t *pl) /* {{{ */
{
int status;
close (fd_pipe_err[1]);
}
+ set_environment ();
exec_child (pl);
/* does not return */
}