in src/mod_rivet_ng/rivet_worker_mpm.c [777:808]
int WorkerBridge_ExitHandler(rivet_thread_private* private)
{
/* This is not strictly necessary, because this command will
* eventually terminate the whole processes */
/* This will force the current thread to exit */
private->ext->keep_going = 0;
//module_globals->mpm->exit_command = 1;
//module_globals->mpm->exit_command_status = private->exit_status;
if (!module_globals->single_thread_exit)
{
module_globals->mpm->skip_thread_on_exit = 1;
/* We now tell the supervisor to terminate the Tcl worker thread pool to exit
* and is sequence the whole process to shutdown by calling exit() */
WorkerBridge_Finalize(private->r->server);
exit(private->exit_status);
}
/*
* If single thread exit is enabled we continue and let the
* thread exit on its own interrupting the main loop
*/
return TCL_OK;
}