plugin: handle corner case where rpc_command is to stop the plugin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-12-06 14:38:27 +10:30
committed by Christian Decker
parent d8fc5332c3
commit f6ed7f2e89
4 changed files with 73 additions and 13 deletions

View File

@@ -240,4 +240,9 @@ struct io_plan *plugin_stdout_conn_init(struct io_conn *conn,
*/
struct log *plugin_get_log(struct plugin *plugin);
/* Pair of functions to detect if plugin destroys itself: must always
* call both! */
struct plugin_destroyed *plugin_detect_destruction(const struct plugin *plugin);
bool was_plugin_destroyed(struct plugin_destroyed *destroyed);
#endif /* LIGHTNING_LIGHTNINGD_PLUGIN_H */