int WorkerBridge_ExitHandler()

in src/mod_rivet_ng/rivet_worker_mpm.c [812:841]


int WorkerBridge_ExitHandler(rivet_thread_private* private)
{
    /* This is not strictly necessary, because this command will
     * eventually terminate the whole processes
     */

    /* By setting this flag to 0 we let the thread exit when the
     * request processing has completed
     */

    private->ext->keep_going = 0;

    module_globals->mpm->exit_command = 1;
    module_globals->mpm->exit_command_status = private->exit_status;

    /* In case single_thread_exit we return preparing this thread to exit */

    if (!private->running_conf->single_thread_exit)
    {
        /* 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);

    }

    return TCL_OK;
}