httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r699476 - in /httpd/httpd/trunk/server/mpm/winnt: mpm_winnt.c mpm_winnt.h
Date Fri, 26 Sep 2008 20:08:15 GMT
Author: wrowe
Date: Fri Sep 26 13:08:15 2008
New Revision: 699476

URL: http://svn.apache.org/viewvc?rev=699476&view=rev
Log:
Track the internal stack_res_flag for properly constraining
win32 stacksize on windows 2003 (xp) and 2008 (vista).

Modified:
    httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
    httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.h

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c?rev=699476&r1=699475&r2=699476&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.c Fri Sep 26 13:08:15 2008
@@ -56,6 +56,9 @@
 
 OSVERSIONINFO osver; /* VER_PLATFORM_WIN32_NT */
 
+/* set by child_main to STACK_SIZE_PARAM_IS_A_RESERVATION for NT >= 5.1 (XP/2003) */
+DWORD stack_res_flag;
+
 static DWORD parent_pid;
 DWORD my_pid;
 
@@ -1017,6 +1020,12 @@
     osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
     GetVersionEx(&osver);
 
+    if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT 
+        && ((osver.dwMajorVersion > 5)
+         || ((osver.dwMajorVersion == 5) && (osver.dwMinorVersion > 0)))) {
+        stack_res_flag = STACK_SIZE_PARAM_IS_A_RESERVATION;
+    }
+
     /* AP_PARENT_PID is only valid in the child */
     pid = getenv("AP_PARENT_PID");
     if (pid)

Modified: httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.h?rev=699476&r1=699475&r2=699476&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.h (original)
+++ httpd/httpd/trunk/server/mpm/winnt/mpm_winnt.h Fri Sep 26 13:08:15 2008
@@ -65,11 +65,13 @@
 void mpm_nt_eventlog_stderr_open(char *display_name, apr_pool_t *p);
 void mpm_nt_eventlog_stderr_flush(void);
 
-/* From winnt.c: */
+/* From mpm_winnt.c: */
 
 extern int use_acceptex;
 extern int winnt_mpm_state;
 extern OSVERSIONINFO osver;
+extern DWORD stack_res_flag;
+
 extern void clean_child_exit(int);
 
 void setup_signal_names(char *prefix);



Mime
View raw message