mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
plugin: Set LIGHTNINGD_PLUGIN env var inform plugins
It might be useful to take special precautions inside a plugin when being run as a plugin (and not as a standalone executable). This env var is just set so plugins can differentiate correctly. I don't unset the variable since it shouldn't have any effect on `lightningd` itself. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
72b68845ca
commit
968aeac908
@ -899,6 +899,7 @@ void plugins_init(struct plugins *plugins, const char *dev_plugin_debug)
|
||||
plugins->pending_manifests = 0;
|
||||
uintmap_init(&plugins->pending_requests);
|
||||
|
||||
setenv("LIGHTNINGD_PLUGIN", "1", 1);
|
||||
/* Spawn the plugin processes before entering the io_loop */
|
||||
list_for_each(&plugins->plugins, p, list) {
|
||||
bool debug;
|
||||
|
Loading…
Reference in New Issue
Block a user