Browse Source

On locking failure, return -1 instead of exit()ing.

This is safe, since the only caller (options_act) will check the
return value, and propagate failure.
Nick Mathewson 6 years ago
parent
commit
c247a2df6b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/or/main.c

+ 1 - 1
src/or/main.c

@@ -3265,7 +3265,7 @@ try_locking(const or_options_t *options, int err_if_locked)
         r = try_locking(options, 0);
         if (r<0) {
           log_err(LD_GENERAL, "No, it's still there.  Exiting.");
-          exit(1); // XXXX bad exit
+          return -1;
         }
         return r;
       }