core-lightning/common/daemon.h
Rusty Russell 12a39b8a79 lightningd: fix backtraces in memleak detection.
We were using a *different* backtrace_state var, which was always NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-24 19:54:32 +02:00

16 lines
418 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);
struct backtrace_state *backtrace_state;
#endif /* LIGHTNING_COMMON_DAEMON_H */