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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-02-16 12:30:41 +10:30
committed by Christian Decker
parent eb17d6af71
commit 256bdc12ff

View File

@@ -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);