--- /dev/null
+ o Code simplification and refactoring:
+ - Treat the loss of an owning controller as equivalent to a SIGTERM
+ signal. This removes a tiny amount of duplicated code, and simplifies
+ our callgraph. Closes ticekt 16788.
return 0;
}
-static void lost_owning_controller(const char *owner_type,
- const char *loss_manner)
- ATTR_NORETURN;
-
/** Shut down this Tor instance in the same way that SIGINT would, but
* with a log message appropriate for the loss of an owning controller. */
static void
log_notice(LD_CONTROL, "Owning controller %s has %s -- exiting now.",
owner_type, loss_manner);
- /* XXXX Perhaps this chunk of code should be a separate function,
- * called here and by process_signal(SIGINT). */
- tor_cleanup();
- exit(0);
+ activate_signal(SIGTERM);
}
/** Called when <b>conn</b> is being freed. */
* if this Tor instance is not currently owned by a process. */
static tor_process_monitor_t *owning_controller_process_monitor = NULL;
-static void owning_controller_procmon_cb(void *unused) ATTR_NORETURN;
-
/** Process-termination monitor callback for Tor's owning controller
* process. */
static void