summaryrefslogtreecommitdiff
path: root/src/app/main/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-01 11:51:33 -0400
committerNick Mathewson <nickm@torproject.org>2018-11-05 09:22:02 -0500
commit7bb76b24cf755799b7950ef078ac5ccf4d6e3a8a (patch)
treed36334e1f0ab425736864a40e6d0cd9ff3f39064 /src/app/main/main.c
parent0ce1f2d46646fd73abee56888650288055f16a53 (diff)
downloadtor-7bb76b24cf755799b7950ef078ac5ccf4d6e3a8a.tar.gz
tor-7bb76b24cf755799b7950ef078ac5ccf4d6e3a8a.zip
Code to manage the list of subsystems.
Diffstat (limited to 'src/app/main/main.c')
-rw-r--r--src/app/main/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app/main/main.c b/src/app/main/main.c
index ae87add67d..444d6ea7ec 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -15,6 +15,7 @@
#include "app/config/statefile.h"
#include "app/main/main.h"
#include "app/main/ntmain.h"
+#include "app/main/subsysmgr.h"
#include "core/mainloop/connection.h"
#include "core/mainloop/cpuworker.h"
#include "core/mainloop/mainloop.h"
@@ -813,6 +814,9 @@ tor_free_all(int postfork)
release_lockfile();
}
tor_libevent_free_all();
+
+ subsystems_shutdown();
+
/* Stuff in util.c and address.c*/
if (!postfork) {
escaped(NULL);
@@ -1426,6 +1430,8 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
event_set_mem_functions(tor_malloc_, tor_realloc_, tor_free_);
#endif
+ subsystems_init();
+
init_protocol_warning_severity_level();
update_approx_time(time(NULL));