summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d40825d)
raw | patch | inline | side by side (parent: d40825d)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 28 Oct 2007 09:50:24 +0000 (10:50 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Sun, 28 Oct 2007 10:48:33 +0000 (11:48 +0100) |
perl_parse() has to set it to "-e" which is not very meaningful. It would
be even nicer to set it to argv[0] but this is not available from inside
the plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
be even nicer to set it to argv[0] but this is not available from inside
the plugin.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/perl.c | patch | blob | history |
diff --git a/src/perl.c b/src/perl.c
index dde34b804f9ce01d885ce1f1bb98bb3e53ddb423..1ed9d003d12ad84d3ce105fd18bdca70f8c6931d 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
log_err ("module_register: Unable to bootstrap Collectd.");
exit (1);
}
+
+ /* Set $0 to "collectd" because perl_parse() has to set it to "-e". */
+ Perl_sv_setpv (perl, Perl_get_sv (perl, "0", 0), "collectd");
+
perl_run (perl);
plugin_register_log ("perl", perl_log);