stoddard 01/07/13 06:37:32
Modified: threadproc/win32 proc.c
Log:
Win32: Do not set the detached attribute for os_levels less than NT.
Revision Changes Path
1.47 +10 -2 apr/threadproc/win32/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/win32/proc.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- proc.c 2001/07/12 17:30:14 1.46
+++ proc.c 2001/07/13 13:37:24 1.47
@@ -339,9 +339,17 @@
if (attr->detached) {
/* If we are creating ourselves detached, Then we should hide the
* window we are starting in. And we had better redfine our
- * handles for STDIN, STDOUT, and STDERR.
+ * handles for STDIN, STDOUT, and STDERR. Do not set the
+ * detached attribute for Win9x. We have found that Win9x does
+ * not manage the stdio handles properly when running old 16
+ * bit executables if the detached attribute is set.
*/
- dwCreationFlags |= DETACHED_PROCESS;
+ apr_oslevel_e os_level;
+ if (apr_get_oslevel(cont, &os_level) == APR_SUCCESS) {
+ if (os_level >= APR_WIN_NT) {
+ dwCreationFlags |= DETACHED_PROCESS;
+ }
+ }
attr->si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
attr->si.wShowWindow = SW_HIDE;