mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
daemon: print version in crash backtrace.
Sometimes people only send us the crash, not the logs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
56046d470b
commit
02b55e35b8
@@ -32,12 +32,12 @@ static int backtrace_status(void *unused UNUSED, uintptr_t pc,
|
|||||||
static void crashdump(int sig)
|
static void crashdump(int sig)
|
||||||
{
|
{
|
||||||
/* We do stderr first, since it's most reliable. */
|
/* We do stderr first, since it's most reliable. */
|
||||||
warnx("Fatal signal %d", sig);
|
warnx("Fatal signal %d (version %s)", sig, version());
|
||||||
if (backtrace_state)
|
if (backtrace_state)
|
||||||
backtrace_print(backtrace_state, 0, stderr);
|
backtrace_print(backtrace_state, 0, stderr);
|
||||||
|
|
||||||
/* Now send to parent. */
|
/* Now send to parent. */
|
||||||
bt_print("FATAL SIGNAL %d", sig);
|
bt_print("FATAL SIGNAL %d (version %s)", sig, version());
|
||||||
if (backtrace_state)
|
if (backtrace_state)
|
||||||
backtrace_full(backtrace_state, 0, backtrace_status, NULL, NULL);
|
backtrace_full(backtrace_state, 0, backtrace_status, NULL, NULL);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user