mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
e847ca221a
A backtrace which makes it much easier to figure out what's happening. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
26 lines
722 B
C
26 lines
722 B
C
#ifndef LIGHTNING_COMMON_DAEMON_H
|
|
#define LIGHTNING_COMMON_DAEMON_H
|
|
#include "config.h"
|
|
#include <poll.h>
|
|
|
|
/* Common setup for all daemons */
|
|
void daemon_setup(const char *argv0,
|
|
void (*backtrace_print)(const char *fmt, ...),
|
|
void (*backtrace_exit)(void));
|
|
|
|
/* Exposed for lightningd's use. */
|
|
int daemon_poll(struct pollfd *fds, nfds_t nfds, int timeout);
|
|
|
|
/* Print a backtrace to stderr, and via backtrace_print */
|
|
void send_backtrace(const char *why);
|
|
|
|
/* Shutdown for a valgrind-clean exit (frees everything) */
|
|
void daemon_shutdown(void);
|
|
|
|
/* Kick in a debugger if they set --debugger */
|
|
void daemon_maybe_debug(char *argv[]);
|
|
|
|
struct backtrace_state *backtrace_state;
|
|
|
|
#endif /* LIGHTNING_COMMON_DAEMON_H */
|