MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_kill

Function plugin_kill

lightningd/plugin.c:359–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359void plugin_kill(struct plugin *plugin, enum log_level loglevel,
360 const char *fmt, ...)
361{
362 va_list ap;
363 const char *msg;
364
365 va_start(ap, fmt);
366 msg = tal_vfmt(tmpctx, fmt, ap);
367 va_end(ap);
368
369 log_(plugin->log, loglevel,
370 NULL, loglevel >= LOG_UNUSUAL,
371 "Killing plugin: %s", msg);
372 kill(plugin->pid, SIGKILL);
373 if (plugin->start_cmd) {
374 plugin_cmd_killed(plugin->start_cmd, plugin, msg);
375 plugin->start_cmd = NULL;
376 }
377
378 /* Don't come back when we free stdout_conn! */
379 io_set_finish(plugin->stdout_conn, NULL, NULL);
380 tal_free(plugin);
381}
382
383/**
384 * Send a JSON-RPC message (request or notification) to the plugin.

Callers 9

check_plugins_manifestsFunction · 0.85
plugin_registerFunction · 0.85
plugin_read_jsonFunction · 0.85
plugin_conn_finishFunction · 0.85
plugin_manifest_timeoutFunction · 0.85
plugin_manifest_cbFunction · 0.85
plugins_send_getmanifestFunction · 0.85
plugin_config_cbFunction · 0.85
plugin_stopFunction · 0.85

Calls 3

plugin_cmd_killedFunction · 0.85
tal_freeFunction · 0.85
log_Function · 0.70

Tested by

no test coverage detected