]> git.pld-linux.org Git - packages/apache.git/commitdiff
- from upstream: fix child process hang during graceful restart/stop in auto/th/apache-2_2_11-3 auto/ti/apache-2_2_11-3
authorhawk <hawk@pld-linux.org>
Thu, 12 Feb 2009 16:16:31 +0000 (16:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  configurations with multiple listening sockets

Changed files:
    apache-prefork-graceful-fix.patch -> 1.1
    apache.spec -> 1.552

apache-prefork-graceful-fix.patch [new file with mode: 0644]
apache.spec

diff --git a/apache-prefork-graceful-fix.patch b/apache-prefork-graceful-fix.patch
new file mode 100644 (file)
index 0000000..d5085db
--- /dev/null
@@ -0,0 +1,42 @@
+--- server/mpm/prefork/prefork.c       2009/01/31 20:53:11     739607
++++ server/mpm/prefork/prefork.c       2009/01/31 20:54:55     739608
+@@ -577,19 +577,27 @@
+                 apr_int32_t numdesc;
+                 const apr_pollfd_t *pdesc;
+-                /* timeout == -1 == wait forever */
+-                status = apr_pollset_poll(pollset, -1, &numdesc, &pdesc);
++                /* check for termination first so we don't sleep for a while in
++                 * poll if already signalled
++                 */
++                if (one_process && shutdown_pending) {
++                    SAFE_ACCEPT(accept_mutex_off());
++                    return;
++                }
++                else if (die_now) {
++                    /* In graceful stop/restart; drop the mutex
++                     * and terminate the child. */
++                    SAFE_ACCEPT(accept_mutex_off());
++                    clean_child_exit(0);
++                }
++                /* timeout == 10 seconds to avoid a hang at graceful restart/stop
++                 * caused by the closing of sockets by the signal handler
++                 */
++                status = apr_pollset_poll(pollset, apr_time_from_sec(10), 
++                                          &numdesc, &pdesc);
+                 if (status != APR_SUCCESS) {
+-                    if (APR_STATUS_IS_EINTR(status)) {
+-                        if (one_process && shutdown_pending) {
+-                            return;
+-                        }
+-                        else if (die_now) {
+-                            /* In graceful stop/restart; drop the mutex
+-                             * and terminate the child. */
+-                            SAFE_ACCEPT(accept_mutex_off());
+-                            clean_child_exit(0);
+-                        }
++                    if (APR_STATUS_IS_TIMEUP(status) ||
++                        APR_STATUS_IS_EINTR(status)) {
+                         continue;
+                     }
+                     /* Single Unix documents select as returning errnos
index a0690521a1f5ef64fe439d855e3e9cd14e17ba8e..ba319c2357895419dbcec7b1f86e7fc2d256c9c2 100644 (file)
@@ -34,7 +34,7 @@ Summary(ru.UTF-8):    Самый популярный веб-сервер
 Summary(tr.UTF-8):     Lider WWW tarayıcı
 Name:          apache
 Version:       2.2.11
-Release:       2
+Release:       3
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
 Source0:       http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -92,6 +92,7 @@ Patch20:      %{name}-apxs.patch
 Patch21:       httpd-peruser.patch
 Patch23:       %{name}-suexec_fcgi.patch
 Patch24:       %{name}-revert-bug-40463.patch
+Patch25:       %{name}-prefork-graceful-fix.patch
 URL:           http://httpd.apache.org/
 BuildRequires: apr-devel >= 1:1.2
 BuildRequires: apr-util-devel >= 1:1.3
@@ -1749,6 +1750,7 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
 %patch21 -p1
 %patch23 -p1
 %patch24 -p1
+%patch25 -p0
 
 # using system apr, apr-util and pcre
 rm -rf srclib/{apr,apr-util,pcre}
This page took 0.074508 seconds and 4 git commands to generate.