return -1;
}
- if (monitor_owning_controller_process(options->OwningControllerProcess)) {
- log_warn(LD_CONFIG, "Error monitoring owning controller process");
- return -1;
- }
+ monitor_owning_controller_process(options->OwningControllerProcess);
/* reload keys as needed for rendezvous services. */
if (rend_service_load_keys()<0) {
}
/** Set <b>process_spec</b> as Tor's owning controller process.
- * Return 0 on success, -1 on failure. */
-int
+ * Exit on failure. */
+void
monitor_owning_controller_process(const char *process_spec)
{
const char *msg;
owning_controller_process_spec)) {
/* Same process -- return now, instead of disposing of and
* recreating the process-termination monitor. */
- return 0;
+ return;
}
/* We are currently owned by a process, and we should no longer be
(owning_controller_process_monitor == NULL));
if (process_spec == NULL)
- return 0;
+ return;
owning_controller_process_spec = tor_strdup(process_spec);
owning_controller_process_monitor =
&msg);
if (owning_controller_process_monitor == NULL) {
- log_warn(LD_CONTROL, "Couldn't create process-termination monitor for "
- "owning controller: %s",
- msg);
- return -1;
+ log_err(LD_BUG, "Couldn't create process-termination monitor for "
+ "owning controller: %s. Exiting.",
+ msg);
+ owning_controller_process_spec = NULL;
+ tor_cleanup();
+ exit(0);
}
-
- return 0;
}
/** Convert the name of a bootstrapping phase <b>s</b> into strings
void disable_control_logging(void);
void enable_control_logging(void);
-int monitor_owning_controller_process(const char *process_spec);
+void monitor_owning_controller_process(const char *process_spec);
void control_event_bootstrap(bootstrap_status_t status, int progress);
void control_event_bootstrap_problem(const char *warn, int reason);