Commit c07ed111 authored by Greg Ames's avatar Greg Ames
Browse files

worker/event MPMs: graceful-stop doesn't work if the listener thread is

waiting for an available worker thread.  PR 43081

Reported by: Paul Querna
Debugged by: Takashi Sato [takashi lans-tv.com]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@668826 13f79535-47bb-0310-9956-ffa450edef68
parent a4b6dfa7
Loading
Loading
Loading
Loading
+4 −1
Changes for server/mpm/experimental/event/event.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -276,6 +276,10 @@ static void wakeup_listener(void)
         */
        return;
    }

    /* unblock the listener if it's waiting for a worker */
    ap_queue_info_term(worker_queue_info); 

    /*
     * we should just be able to "kill(ap_my_pid, LISTENER_SIGNAL)" on all
     * platforms and wake up the listener thread since it is the only thread
@@ -314,7 +318,6 @@ static void signal_threads(int mode)
    if (mode == ST_UNGRACEFUL) {
        workers_may_exit = 1;
        ap_queue_interrupt_all(worker_queue);
        ap_queue_info_term(worker_queue_info);
        close_worker_sockets(); /* forcefully kill all current connections */
    }
}
+4 −1
Changes for server/mpm/worker/worker.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -250,6 +250,10 @@ static void wakeup_listener(void)
         */
        return;
    }

    /* unblock the listener if it's waiting for a worker */
    ap_queue_info_term(worker_queue_info); 

    /*
     * we should just be able to "kill(ap_my_pid, LISTENER_SIGNAL)" on all
     * platforms and wake up the listener thread since it is the only thread
@@ -288,7 +292,6 @@ static void signal_threads(int mode)
    if (mode == ST_UNGRACEFUL) {
        workers_may_exit = 1;
        ap_queue_interrupt_all(worker_queue);
        ap_queue_info_term(worker_queue_info);
        close_worker_sockets(); /* forcefully kill all current connections */
    }
}