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.
This commit is contained in:
Nick Mathewson 2017-10-20 10:27:05 -04:00
parent 9bafc3b1ef
commit c247a2df6b

View file

@ -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;
}