summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-08 08:56:53 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-08 08:56:53 -0400
commitc151f46445ac76e5ab13688eba5612ada5c5af45 (patch)
treee61b45ff0c853bb99b1c563c38f8cc27aaa97271 /src/or/config.c
parentad3f0953e6da8bf95f2dd754b91705d4c7d80a1e (diff)
parent1098893e4f3753bf66248abf81702175dca980ee (diff)
downloadtor-c151f46445ac76e5ab13688eba5612ada5c5af45.tar.gz
tor-c151f46445ac76e5ab13688eba5612ada5c5af45.zip
Merge branch 'ticket20119'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 318789567d..c0072fe4ef 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1772,9 +1772,13 @@ options_act(const or_options_t *old_options)
}
/* Write our PID to the PID file. If we do not have write permissions we
- * will log a warning */
+ * will log a warning and exit. */
if (options->PidFile && !sandbox_is_active()) {
- write_pidfile(options->PidFile);
+ if (write_pidfile(options->PidFile) < 0) {
+ log_err(LD_CONFIG, "Unable to write PIDFile %s",
+ escaped(options->PidFile));
+ return -1;
+ }
}
/* Register addressmap directives */