aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-13 10:48:07 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-13 10:48:07 -0400
commit600744b4be3d83a3e4924c8712bc30b7de1f4d3c (patch)
tree9060cc5d17499fc87b93c8d14492df8cae1a9e59 /src/or/main.c
parent87c79cf01760787bcd9e8616b17babe5a7e4eca4 (diff)
parent5f2a1a7b4f20be121cd30def95cf7789924ca70a (diff)
downloadtor-600744b4be3d83a3e4924c8712bc30b7de1f4d3c.tar.gz
tor-600744b4be3d83a3e4924c8712bc30b7de1f4d3c.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/config.c src/or/dirserv.c src/or/or.h
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 0e866b7307..d5ce6ee486 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -2283,12 +2283,14 @@ void
tor_cleanup(void)
{
or_options_t *options = get_options();
- /* Remove our pid file. We don't care if there was an error when we
- * unlink, nothing we could do about it anyways. */
if (options->command == CMD_RUN_TOR) {
time_t now = time(NULL);
+ /* Remove our pid file. We don't care if there was an error when we
+ * unlink, nothing we could do about it anyways. */
if (options->PidFile)
unlink(options->PidFile);
+ if (options->ControlPortWriteToFile)
+ unlink(options->ControlPortWriteToFile);
if (accounting_is_enabled(options))
accounting_record_bandwidth_usage(now, get_or_state());
or_state_mark_dirty(get_or_state(), 0); /* force an immediate save. */