]> granicus.if.org Git - apache/commitdiff
The last two of several helper threads which do not need a default
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 26 Sep 2008 20:13:29 +0000 (20:13 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 26 Sep 2008 20:13:29 +0000 (20:13 +0000)
1GB stack (but where on earth does 1000 come from?  nonsense.)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@699480 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/child.c

index b68a61fba0603f37f86d245d4c3b072f1e7705a8..edd61cdc8ad33d6d4c47279f4168a7390664fa0e 100644 (file)
@@ -857,8 +857,12 @@ static void create_listener_thread()
     int tid;
     int num_listeners = 0;
     if (!use_acceptex) {
-        _beginthreadex(NULL, 0, win9x_accept,
-                       NULL, 0, &tid);
+        /* A smaller stack is sufficient.
+         * To convert to CreateThread, the returned handle cannot be 
+         * ignored, it must be closed/joined.
+         */
+        _beginthreadex(NULL, 65536, win9x_accept,
+                       NULL, stack_res_flag, &tid);
     } else {
         /* Start an accept thread per listener
          * XXX: Why would we have a NULL sd in our listeners?
@@ -880,8 +884,12 @@ static void create_listener_thread()
         /* Now start a thread per listener */
         for (lr = ap_listeners; lr; lr = lr->next) {
             if (lr->sd != NULL) {
-                _beginthreadex(NULL, 1000, winnt_accept,
-                               (void *) lr, 0, &tid);
+                /* A smaller stack is sufficient.
+                 * To convert to CreateThread, the returned handle cannot be 
+                 * ignored, it must be closed/joined.
+                 */
+                _beginthreadex(NULL, 65536, winnt_accept,
+                               (void *) lr, stack_res_flag, &tid);
             }
         }
     }