summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2002-04-22 07:02:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>2002-04-22 07:02:03 +0000
commit139cf11b10fe82ec7be04ae7d145dc452057d38b (patch)
tree1cb43bff9a117b89a935d720a20175cb2de82c37 /win32
parent8538195845a2e6641a36c6f7790f106f390daba9 (diff)
downloadperl-139cf11b10fe82ec7be04ae7d145dc452057d38b.tar.gz
another windows fix: only create a new console for subprocesses
when all three stdhandles are invalid (from Jan Dubois) p4raw-id: //depot/perl@16062
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 28619fdc44..ba8c637211 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3727,14 +3727,14 @@ win32_spawnvp(int mode, const char *cmdname, const char *const *argv)
StartupInfo.hStdInput = tbl.childStdIn;
StartupInfo.hStdOutput = tbl.childStdOut;
StartupInfo.hStdError = tbl.childStdErr;
- if (StartupInfo.hStdInput != INVALID_HANDLE_VALUE &&
- StartupInfo.hStdOutput != INVALID_HANDLE_VALUE &&
- StartupInfo.hStdError != INVALID_HANDLE_VALUE)
+ if (StartupInfo.hStdInput == INVALID_HANDLE_VALUE &&
+ StartupInfo.hStdOutput == INVALID_HANDLE_VALUE &&
+ StartupInfo.hStdError == INVALID_HANDLE_VALUE)
{
- StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
+ create |= CREATE_NEW_CONSOLE;
}
else {
- create |= CREATE_NEW_CONSOLE;
+ StartupInfo.dwFlags |= STARTF_USESTDHANDLES;
}
if (w32_use_showwindow) {
StartupInfo.dwFlags |= STARTF_USESHOWWINDOW;