mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
1a4a59d221
In particular, the main daemon and subdaemons share the backtrace code, with hooks for logging. The daemon hook inserts the io_poll override, which means we no longer need io_debug.[ch]. Though most daemons don't need it, they still link against ccan/io, so it's harmess (suggested by @ZmnSCPxj). This was tested manually to make sure we get backtraces still. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 lines
376 B
C
14 lines
376 B
C
#ifndef LIGHTNING_COMMON_DAEMON_H
|
|
#define LIGHTNING_COMMON_DAEMON_H
|
|
#include "config.h"
|
|
|
|
/* Common setup for all daemons */
|
|
void daemon_setup(const char *argv0,
|
|
void (*backtrace_print)(const char *fmt, ...),
|
|
void (*backtrace_exit)(void));
|
|
|
|
/* Shutdown for a valgrind-clean exit (frees everything) */
|
|
void daemon_shutdown(void);
|
|
|
|
#endif /* LIGHTNING_COMMON_DAEMON_H */
|