apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r568820 - /apr/apr/branches/0.9.x/threadproc/win32/proc.c
Date Thu, 23 Aug 2007 04:11:39 GMT
Author: wrowe
Date: Wed Aug 22 21:11:39 2007
New Revision: 568820

URL: http://svn.apache.org/viewvc?rev=568820&view=rev
Log:
Make Win32 consistent with unix, in that we will inherit the default
stdin/out/err if some of these handles are left unset, while one
or two of them are set with apr_procattr_io_set() (with one or more
APR_NO_PIPE's) and/or apr_procattr_child_XXX_set().

Backport: 568818

Modified:
    apr/apr/branches/0.9.x/threadproc/win32/proc.c

Modified: apr/apr/branches/0.9.x/threadproc/win32/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/threadproc/win32/proc.c?rev=568820&r1=568819&r2=568820&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/threadproc/win32/proc.c (original)
+++ apr/apr/branches/0.9.x/threadproc/win32/proc.c Wed Aug 22 21:11:39 2007
@@ -613,15 +613,15 @@
 
             si.hStdInput = (attr->child_in) 
                               ? attr->child_in->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_INPUT_HANDLE);
 
             si.hStdOutput = (attr->child_out)
                               ? attr->child_out->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_OUTPUT_HANDLE);
 
             si.hStdError = (attr->child_err)
                               ? attr->child_err->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_ERROR_HANDLE);
         }
         rv = CreateProcessW(wprg, wcmd,        /* Executable & Command line */
                             NULL, NULL,        /* Proc & thread security attributes */
@@ -662,15 +662,15 @@
 
             si.hStdInput = (attr->child_in) 
                               ? attr->child_in->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_INPUT_HANDLE);
 
             si.hStdOutput = (attr->child_out)
                               ? attr->child_out->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_OUTPUT_HANDLE);
 
             si.hStdError = (attr->child_err)
                               ? attr->child_err->filehand
-                              : INVALID_HANDLE_VALUE;
+                              : GetStdHandle(STD_ERROR_HANDLE);
         }
 
         rv = CreateProcessA(progname, cmdline, /* Command line */



Mime
View raw message