diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-01 12:40:55 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-05 09:22:02 -0500 |
commit | 175153a3290b3987faacac9d5390e87e1ad4a457 (patch) | |
tree | ffe76b1752c481a4e0b47aeb2c21adb58d38a179 /src/app | |
parent | 6e7ff8cba0efaf803e3ef5b5aba4123633fe0658 (diff) | |
download | tor-175153a3290b3987faacac9d5390e87e1ad4a457.tar.gz tor-175153a3290b3987faacac9d5390e87e1ad4a457.zip |
Make initialization for the "err" library into a subsystem.
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main/main.c | 10 | ||||
-rw-r--r-- | src/app/main/subsystem_list.c | 4 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c index 031f570097..e3d7610c82 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -69,7 +69,6 @@ #include "lib/container/buffers.h" #include "lib/crypt_ops/crypto_rand.h" #include "lib/crypt_ops/crypto_s2k.h" -#include "lib/err/backtrace.h" #include "lib/geoip/geoip.h" #include "lib/process/waitpid.h" @@ -822,7 +821,6 @@ tor_free_all(int postfork) if (!postfork) { escaped(NULL); esc_router_info(NULL); - clean_up_backtrace_handler(); logs_free_all(); /* free log strings. do this last so logs keep working. */ } } @@ -1419,14 +1417,6 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) #endif /* !defined(_WIN64) */ #endif /* defined(_WIN32) */ - { - int bt_err = configure_backtrace_handler(get_version()); - if (bt_err < 0) { - log_warn(LD_BUG, "Unable to install backtrace handler: %s", - strerror(-bt_err)); - } - } - #ifdef EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED event_set_mem_functions(tor_malloc_, tor_realloc_, tor_free_); #endif diff --git a/src/app/main/subsystem_list.c b/src/app/main/subsystem_list.c index fc1249e1c6..244dbadbd9 100644 --- a/src/app/main/subsystem_list.c +++ b/src/app/main/subsystem_list.c @@ -8,13 +8,15 @@ #include "lib/cc/compat_compiler.h" #include "lib/cc/torint.h" +#include "lib/err/torerr_sys.h" + #include <stddef.h> /** * Global list of the subsystems in Tor, in the order of their initialization. **/ const subsys_fns_t *tor_subsystems[] = { - NULL // placeholder. + &sys_torerr, }; const unsigned n_tor_subsystems = ARRAY_LENGTH(tor_subsystems); |