summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-04-06 19:07:38 +0000
committerRoger Dingledine <arma@torproject.org>2005-04-06 19:07:38 +0000
commit652dde72f1beed1fb83d137314f47aff15b01036 (patch)
treef414cd4a41a69d367f68f4c4fdaeae054b5e2aad /src/or
parent8596947ee220a4ff342cfd72d86cabbf8b6966d8 (diff)
downloadtor-652dde72f1beed1fb83d137314f47aff15b01036.tar.gz
tor-652dde72f1beed1fb83d137314f47aff15b01036.zip
bugfix: chdir to your datadirectory at the *end* of the
daemonize process, not the beginning. this was a problem because the first time you run tor, if your datadir isn't there, and you have runasdaemon set to 1, it will try to chdir to it before it tries to create it. oops. svn:r4033
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 97039fa96a..1d03146cf1 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -266,7 +266,7 @@ options_act(void) {
* It let us have the parent process stick around until we were sure Tor
* was started. Should we make start_daemon get called earlier? -NM */
if (options->RunAsDaemon) {
- start_daemon(options->DataDirectory);
+ start_daemon();
}
if (!libevent_initialized) {
configure_libevent_logging();
@@ -346,7 +346,7 @@ options_act(void) {
/* Finish backgrounding the process */
if (options->RunAsDaemon) {
/* We may be calling this for the n'th time (on SIGHUP), but it's safe. */
- finish_daemon();
+ finish_daemon(options->DataDirectory);
}
/* Write our pid to the pid file. If we do not have write permissions we