diff options
author | teor <teor@torproject.org> | 2019-09-04 15:38:58 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-09-09 14:56:28 +1000 |
commit | a22fbab98690f802ae3bda276078cc7fc767feba (patch) | |
tree | e6624fc08796d4da73c39be845cc4d1ef5847c13 /src/lib/err | |
parent | d02ced4cafaed5b11079585f03f47e73034dd980 (diff) | |
download | tor-a22fbab98690f802ae3bda276078cc7fc767feba.tar.gz tor-a22fbab98690f802ae3bda276078cc7fc767feba.zip |
log: Don't close file log fds that are being used by the err module
Instead, dup() file log fds, before passing them to the err module.
Closes 31613, part of 31594.
Diffstat (limited to 'src/lib/err')
-rw-r--r-- | src/lib/err/torerr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/err/torerr.c b/src/lib/err/torerr.c index 2c4a10a5bb..f460fd8379 100644 --- a/src/lib/err/torerr.c +++ b/src/lib/err/torerr.c @@ -111,6 +111,12 @@ tor_log_get_sigsafe_err_fds(const int **out) * other emergency condition. Ignore any beyond the first * TOR_SIGSAFE_LOG_MAX_FDS. * + * These fds must remain open even after the log module has shut down. (And + * they should remain open even while logs are being reconfigured.) Therefore, + * any fds closed by the log module should be dup()ed, and the duplicate fd + * should be given to the err module in fds. In particular, the log module + * closes the file log fds, but does not close the stdio log fds. + * * If fds is NULL or n is 0, clears the list of error fds. */ void |