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

Function daemon_setup

common/daemon.c:170–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void daemon_setup(const char *argv0,
171 void (*backtrace_print)(const char *fmt, ...),
172 void (*backtrace_exit)(void))
173{
174 common_setup(argv0);
175#if BACKTRACE_SUPPORTED
176 bt_print = backtrace_print;
177 bt_exit = backtrace_exit;
178
179 /* Suppresses backtrace (breaks valgrind) */
180 if (!getenv("LIGHTNINGD_DEV_NO_BACKTRACE"))
181 backtrace_state = backtrace_create_state(argv0, 0, NULL, NULL);
182 crashlog_activate();
183#endif
184
185 memleak_init();
186
187 /* We handle write returning errors! */
188 signal(SIGPIPE, SIG_IGN);
189
190 io_poll_override(daemon_poll);
191}
192
193void daemon_shutdown(void)
194{

Callers 3

mainFunction · 0.85
subdaemon_setupFunction · 0.85
plugin_mainFunction · 0.85

Calls 3

common_setupFunction · 0.85
crashlog_activateFunction · 0.85
memleak_initFunction · 0.85

Tested by

no test coverage detected