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>]
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'
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`
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"
#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;
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) {