]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fixes to produce the Cygwin 1.x binaries out-of-the-box;
authorMartin Kraemer <martin@apache.org>
Tue, 12 Jun 2001 08:39:03 +0000 (08:39 +0000)
committerMartin Kraemer <martin@apache.org>
Tue, 12 Jun 2001 08:39:03 +0000 (08:39 +0000)
Fix perform_idle_server_maintenance() for Cygwin: use SIGKILL rather
than SIGUSR1 because the latter has no effect.

PR: PR#7837 and PR#7838
Submitted by: Stipe Tolj <tolj@wapme-systems.de>
Reviewed by: Martin Kraemer

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@89348 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/Configure
src/helpers/binbuild.sh
src/helpers/install.sh
src/include/ap_config.h
src/main/http_main.c

index 7c0a8e4c14ef56000601bfe6b1bbc6d5f59596fe..ab31f005483a262a15a71caa30d0b8fcfd5982f3 100644 (file)
@@ -1,4 +1,9 @@
 Changes with Apache 1.3.21
+
+  *) (Cygwin only) Fix problems with signals sent to child processes;
+     Improve auto-configuration for Cygwin.
+     [Stipe Tolj <tolj@wapme-systems.de>]
+
   *) Added Mod_Vhost_Alias to the project file so that it builds as an
      external module (VHOST.NLM). 
      [Brad Nicholes <BNICHOLES@novell.com>]
index 27bfef93edf7a8feebea3ed27456deef4ad4821a..36dfdf785701d4b01fda2255cff8389c3a6db66c 100755 (executable)
@@ -840,7 +840,8 @@ case "$PLAT" in
        OSDIR="os/cygwin"
        CFLAGS="$CFLAGS -DCYGWIN"
        DEF_WANTHSREGEX=yes
-       LIBS="$LIBS -lcrypt"
+       DBM_LIB="-lgdbm"
+       LIBS="$LIBS -lcrypt $DBM_LIB"
        ;;
     *) # default: Catch systems we don't know about
        OS='Unknown and unsupported OS'
index 53aa80ff1a96b5dc0840ac226d2cab2010d5fceb..e58830b882cc261954a190a83be83c8767799911 100755 (executable)
@@ -9,6 +9,8 @@
 OS=`src/helpers/GuessOS`
 case "x$OS" in
   x*390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";;
+  *cygwin*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most \
+                         --enable-rule=SHARED_CORE --libexecdir=bin";;
       *) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";;
 esac
 APDIR=`pwd`
index f0d2a14e951982ec0a522eefe40ddc36f4725db8..403104ddd78209cf5aa2e7502063a35ade594cd4 100755 (executable)
@@ -87,7 +87,11 @@ if [ -d $dst ]; then
     dst="$dst/`basename $src`"
 fi
 
-#  Add a possible extension (such as ".exe") to src and dst
+#  Check if we need to add an executable extension (such as ".exe") 
+#  on specific OS to src and dst
+if [ -f "$src.exe" ]; then
+  ext=".exe"
+fi
 src="$src$ext"
 dst="$dst$ext"
 
index 7b99fa8f5a4ba8bd2b640b09839a8f5264a05089..233ff413054d0b2c2c3e68f18b68ffe714a3559e 100644 (file)
@@ -955,6 +955,12 @@ typedef int rlim_t;
 #define JMP_BUF jmp_buf
 #define NO_KILLPG
 #define USE_LONGJMP
+#define GDBM_STATIC
+#define HAVE_MMAP 1
+#define USE_MMAP_SCOREBOARD
+#define USE_MMAP_FILES
+#define HAVE_SYSLOG 1
+
 
 #else
 /* Unknown system - Edit these to match */
index 8a4b4fcc88529a29b2d0671daaa7cd915d304bc3..5b6e096957b92cba47954c1102e152ed24bbfa06 100644 (file)
@@ -4429,6 +4429,20 @@ static int idle_spawn_rate = 1;
 #endif
 static int hold_off_on_exponential_spawning;
 
+/*
+ * Define the signal that is used to kill off children if idle_count
+ * is greater then ap_daemons_max_free. Usually we will use SIGUSR1
+ * to gracefully shutdown, but unfortunatly some OS will need other 
+ * signals to ensure that the child process is terminated and the 
+ * scoreboard pool is not growing to infinity. This effect has been
+ * seen at least on Cygwin 1.x. -- Stipe Tolj <tolj@wapme-systems.de>
+ */
+#if defined(CYGWIN)
+#define SIG_IDLE_KILL SIGKILL
+#else
+#define SIG_IDLE_KILL SIGUSR1
+#endif
+
 static void perform_idle_server_maintenance(void)
 {
     int i;
@@ -4508,9 +4522,10 @@ static void perform_idle_server_maintenance(void)
     if (idle_count > ap_daemons_max_free) {
        /* kill off one child... we use SIGUSR1 because that'll cause it to
         * shut down gracefully, in case it happened to pick up a request
-        * while we were counting
+        * while we were counting. Use the define SIG_IDLE_KILL to reflect
+        * which signal should be used on the specific OS.
         */
-       kill(ap_scoreboard_image->parent[to_kill].pid, SIGUSR1);
+       kill(ap_scoreboard_image->parent[to_kill].pid, SIG_IDLE_KILL);
        idle_spawn_rate = 1;
     }
     else if (idle_count < ap_daemons_min_free) {