]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r239430 to the 2.2.x branch. Lets make sure WINCH is kept free.
authorColm MacCarthaigh <colm@apache.org>
Sun, 18 Sep 2005 19:39:02 +0000 (19:39 +0000)
committerColm MacCarthaigh <colm@apache.org>
Sun, 18 Sep 2005 19:39:02 +0000 (19:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@289961 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
configure.in
include/mpm_common.h
server/mpm/config.m4
server/mpm_common.c

diff --git a/CHANGES b/CHANGES
index 29c563965a959ee06971d01779b523528a9eb016..4d8446d7c51595836871da6411f9f1bb83b411b2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                         -*- coding: utf-8 -*-
+Changes with Apache 2.1.8
+
+  *) Linux 2.0: remove support for threaded MPM's due to linuxthreads use
+     of SIGUSR1 clashing with graceful restart signal. [Colm MacCarthaigh]
+
 Changes with Apache 2.1.7
-  [Remove entries to the current 2.0 section below, when backported]
 
   *) SECURITY: CAN-2005-2491 (cve.mitre.org): 
      Fix integer overflows in PCRE in quantifier parsing which could
index afcf14257ddbba3fc6d0360aa89f5b69a9c81314..ea97e3849e2e156fa70c0678d8d114a103a19807 100644 (file)
@@ -232,8 +232,6 @@ esac
 APACHE_SUBST(SHLTCFLAGS)
 APACHE_SUBST(LTCFLAGS)
 
-AP_SIG_GRACEFUL=USR1
-
 case $host in
   *-apple-aux3*)
       APR_SETVAR(APACHE_MPM, [prefork])
@@ -249,9 +247,6 @@ case $host in
       ;;
   *-linux-*)
       case `uname -r` in
-        2.0* ) 
-            AP_SIG_GRACEFUL=WINCH
-            ;;
         2.[[2-9]]* ) 
             APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
             ;;
@@ -575,15 +570,6 @@ if test "$AP_NONBLOCK_WHEN_MULTI_LISTEN" = "1"; then
               [Listening sockets are non-blocking when there are more than 1])
 fi
 
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL, SIG$AP_SIG_GRACEFUL, [Signal used to gracefully restart])
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_STRING, "SIG$AP_SIG_GRACEFUL", [Signal used to gracefully restart (as a quoted string)])
-AC_DEFINE_UNQUOTED(AP_SIG_GRACEFUL_SHORT, $AP_SIG_GRACEFUL, [Signal used to gracefully restart (without SIG prefix)])
-AP_SIG_GRACEFUL_SHORT=$AP_SIG_GRACEFUL
-AP_SIG_GRACEFUL=SIG$AP_SIG_GRACEFUL_SHORT
-AC_SUBST(AP_SIG_GRACEFUL)
-AC_SUBST(AP_SIG_GRACEFUL_STRING)
-AC_SUBST(AP_SIG_GRACEFUL_SHORT)
-
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile srclib/pcre/Makefile)
index a36b926ff570c60c62acb4d458d2b63025987676..161b48e486cc7e3a9449f942fe3ac74eaced445b 100644 (file)
@@ -56,6 +56,15 @@ extern "C" {
 #define DEFAULT_LISTENBACKLOG 511
 #endif
         
+/* Signal used to gracefully restart */
+#define AP_SIG_GRACEFUL SIGUSR1
+
+/* Signal used to gracefully restart (without SIG prefix) */
+#define AP_SIG_GRACEFUL_SHORT USR1
+
+/* Signal used to gracefully restart (as a quoted string) */
+#define AP_SIG_GRACEFUL_STRING "SIGUSR1"
+
 /**
  * Make sure all child processes that have been spawned by the parent process
  * have died.  This includes process registered as "other_children".
index f8b2022cdd976b9503114019d147f63d6e573406..34018382e1c286ba5e3eeeb4bcef35d4c719e912 100644 (file)
@@ -38,6 +38,22 @@ if ap_mpm_is_threaded; then
     AC_MSG_CHECKING(checking for replacement)
     AC_MSG_RESULT(prefork selected)
     apache_cv_mpm=prefork
+  else
+    case $host in
+      *-linux-*)
+        case `uname -r` in
+          2.0* )
+            dnl Threaded MPM's are not supported on Linux 2.0
+            dnl as on 2.0 the linuxthreads library uses SIGUSR1
+            dnl and SIGUSR2 internally
+            echo "Threaded MPM's are not supported on this platform"
+            AC_MSG_CHECKING(checking for replacement)
+            AC_MSG_RESULT(prefork selected)
+            apache_cv_mpm=prefork
+          ;;
+        esac
+      ;;
+    esac
   fi
 fi
 
index 8554c52e6bd0757a168a5c0dac8391e2c128c986..93711f7c192392105b57b1255ba53fd7f5090d9a 100644 (file)
@@ -917,7 +917,7 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
             printf("httpd not running, trying to start\n");
         }
         else {
-            *exit_status = send_signal(otherpid, SIGUSR1);
+            *exit_status = send_signal(otherpid, AP_SIG_GRACEFUL);
             return 1;
         }
     }