Commit e7c64e94 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

Revert r1823629 to stage backport commits too.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1823636 13f79535-47bb-0310-9956-ffa450edef68
parent 9dbfbe89
Loading
Loading
Loading
Loading
+0 −6
Changes for CHANGES: 0 added lines, 6 removed lines.
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.30
 
  *) mpm_event: Let the listener thread do its maintenance job on resources
     shortage.  PR 61979.  [Yann Ylavic]

  *) mpm_event: Wakeup the listener to re-enable listening sockets.
     [Yann Ylavic]

  *) mod_ssl: The SSLCompression directive will now give an error if used
     with an OpenSSL build which does not support any compression methods.
     [Joe Orton]
+112 −152

File changed.

Preview size limit exceeded, changes collapsed.

+42 −33

File changed.

Preview size limit exceeded, changes collapsed.

+15 −14
Changes for server/mpm/worker/fdqueue.c: 15 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -382,30 +382,31 @@ apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p)
    return rv;
}

static apr_status_t queue_interrupt_all(fd_queue_t *queue, int term)
apr_status_t ap_queue_interrupt_all(fd_queue_t *queue)
{
    apr_status_t rv;

    if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
        return rv;
    }
    /* we must hold one_big_mutex when setting this... otherwise,
     * we could end up setting it and waking everybody up just after a
     * would-be popper checks it but right before they block
     */
    if (term) {
        queue->terminated = 1;
    }
    apr_thread_cond_broadcast(queue->not_empty);
    return apr_thread_mutex_unlock(queue->one_big_mutex);
}

apr_status_t ap_queue_interrupt_all(fd_queue_t *queue)
{
    return queue_interrupt_all(queue, 0);
}

apr_status_t ap_queue_term(fd_queue_t *queue)
{
    return queue_interrupt_all(queue, 1);
    apr_status_t rv;

    if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
        return rv;
    }
    /* we must hold one_big_mutex when setting this... otherwise,
     * we could end up setting it and waking everybody up just after a
     * would-be popper checks it but right before they block
     */
    queue->terminated = 1;
    if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) {
        return rv;
    }
    return ap_queue_interrupt_all(queue);
}