aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/main.c b/src/or/main.c
index d1728250a4..ea86df0738 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -12,6 +12,7 @@
#include "or.h"
#include "addressmap.h"
+#include "backtrace.h"
#include "buffers.h"
#include "channel.h"
#include "channeltls.h"
@@ -2304,7 +2305,7 @@ handle_signals(int is_parent)
int
tor_init(int argc, char *argv[])
{
- char buf[256];
+ char progname[256];
int i, quiet = 0;
time_of_process_start = time(NULL);
if (!connection_array)
@@ -2314,8 +2315,8 @@ tor_init(int argc, char *argv[])
if (!active_linked_connection_lst)
active_linked_connection_lst = smartlist_new();
/* Have the log set up with our application name. */
- tor_snprintf(buf, sizeof(buf), "Tor %s", get_version());
- log_set_application_name(buf);
+ tor_snprintf(progname, sizeof(progname), "Tor %s", get_version());
+ log_set_application_name(progname);
/* Initialize the history structures. */
rep_hist_init();
/* Initialize the service cache. */
@@ -2684,6 +2685,8 @@ tor_main(int argc, char *argv[])
}
#endif
+ configure_backtrace_handler(NULL, get_version());
+
update_approx_time(time(NULL));
tor_threads_init();
init_logging();