diff options
author | teor <teor@torproject.org> | 2019-09-04 14:54:08 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-09-09 14:56:17 +1000 |
commit | d02ced4cafaed5b11079585f03f47e73034dd980 (patch) | |
tree | b7c7b3a13fa055d447705b06812d6de53be45a2c /src/lib/err/torerr_sys.c | |
parent | 896a1ac50b6ab182c1e15cc5271d0b24fcb90a31 (diff) | |
download | tor-d02ced4cafaed5b11079585f03f47e73034dd980.tar.gz tor-d02ced4cafaed5b11079585f03f47e73034dd980.zip |
torerr: Close sigsafe fds on shutdown
And clear the list of error fds.
Part of 31594.
Diffstat (limited to 'src/lib/err/torerr_sys.c')
-rw-r--r-- | src/lib/err/torerr_sys.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/err/torerr_sys.c b/src/lib/err/torerr_sys.c index 3ab1b3c4e1..a14c46f945 100644 --- a/src/lib/err/torerr_sys.c +++ b/src/lib/err/torerr_sys.c @@ -27,8 +27,11 @@ subsys_torerr_initialize(void) static void subsys_torerr_shutdown(void) { - tor_log_reset_sigsafe_err_fds(); + /* Stop handling signals with backtraces, then close the logs. */ clean_up_backtrace_handler(); + /* We can't log any log messages after this point: we've closed all the log + * fds, including stdio. */ + tor_log_close_sigsafe_err_fds(); } const subsys_fns_t sys_torerr = { |