diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-07-19 22:47:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-11-18 10:43:15 -0500 |
commit | bd8ad674b913582b6f8e5b85ac722e14598d681b (patch) | |
tree | 6833bbd938ce99a8d8c91bd8f6e53befdd149711 /src/common/torlog.h | |
parent | b0023083c413c6447ef34cf3c6cfaf54a1cc8793 (diff) | |
download | tor-bd8ad674b913582b6f8e5b85ac722e14598d681b.tar.gz tor-bd8ad674b913582b6f8e5b85ac722e14598d681b.zip |
Add a sighandler-safe logging mechanism
We had accidentially grown two fake ones: one for backtrace.c, and one
for sandbox.c. Let's do this properly instead.
Now, when we configure logs, we keep track of fds that should get told
about bad stuff happening from signal handlers. There's another entry
point for these that avoids using non-signal-handler-safe functions.
Diffstat (limited to 'src/common/torlog.h')
-rw-r--r-- | src/common/torlog.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h index ecd7e121eb..903237940e 100644 --- a/src/common/torlog.h +++ b/src/common/torlog.h @@ -136,7 +136,6 @@ int get_min_log_level(void); void switch_logs_debug(void); void logs_free_all(void); void add_temp_log(int min_severity); -int get_err_logging_fd(void); void close_temp_logs(void); void rollback_log_changes(void); void mark_logs_temp(void); @@ -149,6 +148,10 @@ void set_log_time_granularity(int granularity_msec); void tor_log(int severity, log_domain_mask_t domain, const char *format, ...) CHECK_PRINTF(3,4); +void tor_log_err_sigsafe(const char *m, ...); +int tor_log_get_sigsafe_err_fds(const int **out); +void tor_log_update_sigsafe_err_fds(void); + #if defined(__GNUC__) || defined(RUNNING_DOXYGEN) extern int log_global_min_severity_; |