diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-09 12:13:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-13 10:41:28 -0400 |
commit | dad12188a6ca957f6fde1eb602fd98b2fa93b1a4 (patch) | |
tree | ac7c2d4d5e1ff39675df1bc3723b57ec453b4b92 /src/or/main.c | |
parent | c55c8f0d4926481ea2cf49e14915688de2eb4938 (diff) | |
download | tor-dad12188a6ca957f6fde1eb602fd98b2fa93b1a4.tar.gz tor-dad12188a6ca957f6fde1eb602fd98b2fa93b1a4.zip |
Write automatically-chosen control ports to a file.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 7bae59ce06..15682d5400 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -2046,12 +2046,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. */ |