diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2002-04-22 07:02:03 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2002-04-22 07:02:03 +0000 |
commit | 139cf11b10fe82ec7be04ae7d145dc452057d38b (patch) | |
tree | 1cb43bff9a117b89a935d720a20175cb2de82c37 /win32 | |
parent | 8538195845a2e6641a36c6f7790f106f390daba9 (diff) | |
download | perl-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.c | 10 |
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; |