summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 7a81550632..e046b548d1 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -956,26 +956,24 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
aStartupInfo.cb = sizeof (STARTUPINFO);
- if (hInput || hOutput || hError) {
- aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
- if (hInput) {
- aStartupInfo.hStdInput = hInput;
- }
- else {
- aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- }
- if (hOutput) {
- aStartupInfo.hStdOutput = hOutput;
- }
- else {
- aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- }
- if (hError) {
- aStartupInfo.hStdError = hError;
- }
- else {
- aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
- }
+ aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
+ if (hInput) {
+ aStartupInfo.hStdInput = hInput;
+ }
+ else {
+ aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+ }
+ if (hOutput) {
+ aStartupInfo.hStdOutput = hOutput;
+ }
+ else {
+ aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ }
+ if (hError) {
+ aStartupInfo.hStdError = hError;
+ }
+ else {
+ aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
}
dwCreationFlags = (NORMAL_PRIORITY_CLASS);