mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
lightningd: remove stop
member from plugin.
It's not needed now that plugin_kill frees the plugin immediately. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8c59de5ee5
commit
80f1f0ca15
2 changed files with 0 additions and 6 deletions
|
@ -189,8 +189,6 @@ bool plugin_remove(struct plugins *plugins, const char *name)
|
||||||
void plugin_kill(struct plugin *plugin, const char *msg)
|
void plugin_kill(struct plugin *plugin, const char *msg)
|
||||||
{
|
{
|
||||||
log_info(plugin->log, "Killing plugin: %s", msg);
|
log_info(plugin->log, "Killing plugin: %s", msg);
|
||||||
plugin->stop = true;
|
|
||||||
io_wake(plugin);
|
|
||||||
kill(plugin->pid, SIGKILL);
|
kill(plugin->pid, SIGKILL);
|
||||||
list_del(&plugin->list);
|
list_del(&plugin->list);
|
||||||
|
|
||||||
|
@ -501,8 +499,6 @@ static struct io_plan *plugin_write_json(struct io_conn *conn,
|
||||||
{
|
{
|
||||||
if (tal_count(plugin->js_arr)) {
|
if (tal_count(plugin->js_arr)) {
|
||||||
return json_stream_output(plugin->js_arr[0], plugin->stdin_conn, plugin_stream_complete, plugin);
|
return json_stream_output(plugin->js_arr[0], plugin->stdin_conn, plugin_stream_complete, plugin);
|
||||||
} else if (plugin->stop) {
|
|
||||||
return io_close(conn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return io_out_wait(conn, plugin, plugin_write_json, plugin);
|
return io_out_wait(conn, plugin, plugin_write_json, plugin);
|
||||||
|
@ -1242,7 +1238,6 @@ const char *plugin_send_getmanifest(struct plugin *p)
|
||||||
|
|
||||||
log_debug(p->plugins->log, "started(%u) %s", p->pid, p->cmd);
|
log_debug(p->plugins->log, "started(%u) %s", p->pid, p->cmd);
|
||||||
p->buffer = tal_arr(p, char, 64);
|
p->buffer = tal_arr(p, char, 64);
|
||||||
p->stop = false;
|
|
||||||
|
|
||||||
/* Create two connections, one read-only on top of p->stdout, and one
|
/* Create two connections, one read-only on top of p->stdout, and one
|
||||||
* write-only on p->stdin */
|
* write-only on p->stdin */
|
||||||
|
|
|
@ -43,7 +43,6 @@ struct plugin {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char *cmd;
|
char *cmd;
|
||||||
struct io_conn *stdin_conn, *stdout_conn;
|
struct io_conn *stdin_conn, *stdout_conn;
|
||||||
bool stop;
|
|
||||||
struct plugins *plugins;
|
struct plugins *plugins;
|
||||||
const char **plugin_path;
|
const char **plugin_path;
|
||||||
/* If there's a json command which ordered this to start */
|
/* If there's a json command which ordered this to start */
|
||||||
|
|
Loading…
Add table
Reference in a new issue