From da465f0fdd7fe5b8869e0665adf72688ad7bc3c3 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 14 Nov 2018 09:02:03 +0100 Subject: [PATCH] plugin: Exit if we fail to start a plugin Signed-off-by: Christian Decker <@cdecker> --- lightningd/plugin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lightningd/plugin.c b/lightningd/plugin.c index fc8a95c6e..9a7d18b77 100644 --- a/lightningd/plugin.c +++ b/lightningd/plugin.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -408,6 +409,10 @@ void plugins_init(struct plugins *plugins) cmd[1] = NULL; p->pid = pipecmdarr(&stdout, &stdin, NULL, cmd); + if (p->pid == -1) + fatal("error starting plugin '%s': %s", p->cmd, + strerror(errno)); + list_head_init(&p->output); p->buffer = tal_arr(p, char, 64); p->used = 0;