summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorArlo Breault <arlolra@gmail.com>2014-03-23 09:24:26 -0700
committerNick Mathewson <nickm@torproject.org>2014-07-16 12:16:49 +0200
commit15e170e01b3f67325f952d0becda0438fa879907 (patch)
tree3c9f235db67491c0708a5fccfaf34cfa95ce548b /src/or/main.c
parent98541f2892335a5a512a6c01b2f2227bde1d649e (diff)
downloadtor-15e170e01b3f67325f952d0becda0438fa879907.tar.gz
tor-15e170e01b3f67325f952d0becda0438fa879907.zip
Add an option to overwrite logs
* Issue #5583
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index b4b2faef15..c7b532bbab 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1861,6 +1861,10 @@ do_hup(void)
return -1;
}
options = get_options(); /* they have changed now */
+ /* Logs are only truncated the first time they are opened, but were
+ probably intended to be cleaned up on signal. */
+ if (options->TruncateLogFile)
+ truncate_logs();
} else {
char *msg = NULL;
log_notice(LD_GENERAL, "Not reloading config file: the controller told "