httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject [PATCH] stop threads_per_child from going too high
Date Sun, 18 Jan 1998 04:53:50 GMT
At least this avoids simply falling over with the way the code is now...
isn't a fix, but...

windows.h should be ok to include, right?

Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
retrieving revision 1.146
diff -u -r1.146 http_core.c
--- http_core.c	1998/01/13 23:11:10	1.146
+++ http_core.c	1998/01/18 04:52:25
@@ -1406,6 +1406,17 @@
     if (err != NULL) return err;
 
     threads_per_child = atoi (arg);
+#ifdef WIN32
+    /* XXXX silly limit imposed by WaitForMultipleObjects */
+    if (threads_per_child > MAXIMUM_WAIT_OBJECTS) {
+        aplog_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, cmd->server,
+	    "ThreadsPerChild set to %d, maximum is %d "
+	    "(MAXIMUM_WAIT_OBJECTS), lowering ThreadsPerChild", 
+	    threads_per_child, MAXIMUM_WAIT_OBJECTS);
+	threads_per_child = MAXIMUM_WAIT_OBJECTS;
+    }
+#endif
+	
     return NULL;
 }
 
Index: conf.h
===================================================================
RCS file: /export/home/cvs/apachen/src/main/conf.h,v
retrieving revision 1.166
diff -u -r1.166 conf.h
--- conf.h	1998/01/13 23:11:08	1.166
+++ conf.h	1998/01/18 04:52:27
@@ -807,6 +807,7 @@
 #endif
 
 #else /* WIN32 */
+#include <windows.h>
 #include <winsock.h>
 #include <malloc.h>
 #include <io.h>



Mime
View raw message