summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-08-23 04:11:24 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-08-23 04:11:24 +0000
commit542ba9fe1653fe5e995027318b34e38d78cbb2ee (patch)
tree2d3bd9d76e9b8132d5008b60cf409814cb606988
parent3a328db58fe4ada21c1b7d9ca812a675c2bf39eb (diff)
downloadlibapr-542ba9fe1653fe5e995027318b34e38d78cbb2ee.tar.gz
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 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@568819 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--threadproc/win32/proc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index fe3615a93..5e70c70cd 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -728,15 +728,15 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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);
}
if (attr->user_token) {
si.lpDesktop = L"Winsta0\\Default";
@@ -800,15 +800,15 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
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 */