tor  0.4.2.0-alpha-dev
torerr_sys.c
Go to the documentation of this file.
1 /* Copyright (c) 2018-2019, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
9 #include "orconfig.h"
10 #include "lib/err/backtrace.h"
11 #include "lib/err/torerr.h"
12 #include "lib/err/torerr_sys.h"
13 #include "lib/subsys/subsys.h"
14 #include "lib/version/torversion.h"
15 
16 #include <stddef.h>
17 
18 static int
19 subsys_torerr_initialize(void)
20 {
21  if (configure_backtrace_handler(get_version()) < 0)
22  return -1;
24 
25  return 0;
26 }
27 static void
28 subsys_torerr_shutdown(void)
29 {
32 }
33 
34 const subsys_fns_t sys_torerr = {
35  .name = "err",
36  .level = -100,
37  .supported = true,
38  .initialize = subsys_torerr_initialize,
39  .shutdown = subsys_torerr_shutdown
40 };
Header for backtrace.c.
int configure_backtrace_handler(const char *tor_version)
Definition: backtrace.c:269
Declare subsystem object for torerr.c.
void clean_up_backtrace_handler(void)
Definition: backtrace.c:283
void tor_log_reset_sigsafe_err_fds(void)
Definition: torerr.c:129
Headers for torerr.c.
const char * name
Definition: subsys.h:28