From: Florian Forster Date: Mon, 15 Mar 2010 21:40:45 +0000 (+0100) Subject: Merge branch 'collectd-4.8' into collectd-4.9 X-Git-Tag: collectd-4.9.2~8 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9988d61c84dfff5d04ddf48f4b93f6c9449cdc41;p=collectd.git Merge branch 'collectd-4.8' into collectd-4.9 Conflicts: src/exec.c --- 9988d61c84dfff5d04ddf48f4b93f6c9449cdc41 diff --cc src/exec.c index 3bd6309f,e6006583..681b94d6 --- a/src/exec.c +++ b/src/exec.c @@@ -265,17 -265,7 +265,18 @@@ static int exec_config (oconfig_item_t 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 */ + + __attribute__((noreturn)) static void exec_child (program_list_t *pl) /* {{{ */ { int status;