libplugin: plugin_exit helper which flushes stdout.
We weren't actually getting the last log out; this does that. We have to fix test_bitcoin_failure which now notices the BROKEN log message. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: libplugin: Fatal error messages from plugin_exit() now logged in lightningd.
This commit is contained in:
committed by
Christian Decker
parent
1d8aecb44f
commit
2063049559
@@ -164,6 +164,9 @@ struct command_result *command_param_failed(void);
|
||||
/* Call this on fatal error. */
|
||||
void NORETURN plugin_err(struct plugin *p, const char *fmt, ...);
|
||||
|
||||
/* Normal exit (makes sure to flush output!). */
|
||||
void NORETURN plugin_exit(struct plugin *p, int exitcode);
|
||||
|
||||
/* This command is finished, here's a detailed error; @cmd cannot be
|
||||
* NULL, data can be NULL; otherwise it must be a JSON object. */
|
||||
struct command_result *WARN_UNUSED_RESULT
|
||||
|
||||
Reference in New Issue
Block a user