lightningd/plugin.c: Add important plugins, which if they terminate, lightningd also terminates.

Changelog-Added: New option `--important-plugin` loads a plugin is so important that if it dies, `lightningd` will exit rather than continue.  You can still `--disable-plugin` it, however, which trumps `--important-plugin` and it will not be started at all.
This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-07-29 19:24:07 +08:00
committed by neil saitug
parent 50600dce95
commit a847487bbe
7 changed files with 123 additions and 24 deletions

View File

@@ -58,7 +58,7 @@ struct command_result *plugin_cmd_all_complete(struct plugins *plugins,
static struct command_result *
plugin_dynamic_start(struct command *cmd, const char *plugin_path)
{
struct plugin *p = plugin_register(cmd->ld->plugins, plugin_path, cmd);
struct plugin *p = plugin_register(cmd->ld->plugins, plugin_path, cmd, false);
const char *err;
if (!p)