From 256bdc12ff50f71ec6737dd4f967985cf9178f56 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 16 Feb 2018 12:30:41 +1030 Subject: [PATCH] lightningd: activate crashlog later. We error out for all kinds of reasons early on (eg. bitcoind down), and printing a backtrace for them is pretty confusing. Signed-off-by: Rusty Russell --- lightningd/lightningd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index a34bbfdcb..adb1dfc00 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -285,9 +285,6 @@ int main(int argc, char *argv[]) /* Handle options and config; move to .lightningd */ newdir = handle_opts(ld, argc, argv); - /* Activate crash log now we're in the right place. */ - crashlog_activate(argv[0], ld->log); - /* Ignore SIGPIPE: we look at our write return values*/ signal(SIGPIPE, SIG_IGN); @@ -367,6 +364,9 @@ int main(int argc, char *argv[]) /* Now kick off topology update, now peers have watches. */ begin_topology(ld->topology); + /* Activate crash log now we're not reporting startup failures. */ + crashlog_activate(argv[0], ld->log); + for (;;) { struct timer *expired; void *v = io_loop(&ld->timers, &expired);