summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-02 21:14:17 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-02 21:14:17 (GMT)
commit4435bb091b9fc8e3cb13a769f977a475e32af3e0 (patch)
tree7b548808641f65d9fff4327b8ad45d32b0c86a30 /Source
parentb0518155557bdc85a292d5f6d3355064fd6ef6db (diff)
downloadCMake-4435bb091b9fc8e3cb13a769f977a475e32af3e0.zip
CMake-4435bb091b9fc8e3cb13a769f977a475e32af3e0.tar.gz
CMake-4435bb091b9fc8e3cb13a769f977a475e32af3e0.tar.bz2
Cleanup
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index cc24ddb..0cddcc1 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1351,7 +1351,6 @@ bool WindowsRunCommand(const char* command, const char* dir,
}
else sa.lpSecurityDescriptor = NULL;
-
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = true;
@@ -1380,10 +1379,11 @@ bool WindowsRunCommand(const char* command, const char* dir,
* members. STARTF_USESHOWWINDOW validates the wShowWindow
* member. */
+ si.cb = sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
- si.wShowWindow = SW_HIDE;
si.hStdOutput = newstdout;
si.hStdError = newstdout;
+ si.wShowWindow = SW_HIDE;
//set the new handles for the child process si.hStdInput = newstdin;
char* commandAndArgs = strcpy(new char[strlen(command)+1], command);
@@ -1456,6 +1456,8 @@ bool WindowsRunCommand(const char* command, const char* dir,
if (exit != STILL_ACTIVE) break;
}
+ WaitForSingleObject(pi.hProcess, INFINITE);
+ GetExitCodeProcess(pi.hProcess,&exit);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
CloseHandle(newstdin);