Browse Source

plugin: Exit if we fail to start a plugin

Signed-off-by: Christian Decker <@cdecker>
plugin-2
Christian Decker 6 years ago
parent
commit
c349654ff6
No known key found for this signature in database GPG Key ID: 1416D83DC4F0E86D
  1. 5
      lightningd/plugin.c

5
lightningd/plugin.c

@ -6,6 +6,7 @@
#include <ccan/opt/opt.h>
#include <ccan/pipecmd/pipecmd.h>
#include <ccan/tal/str/str.h>
#include <errno.h>
#include <lightningd/json.h>
#include <unistd.h>
@ -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;

Loading…
Cancel
Save