diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-10-02 11:15:07 -0400 |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-10-02 11:15:07 -0400 |
commit | 8cac76825f335148548bb2bb1491b1a220de6187 (patch) | |
tree | 3c46759a9686b4a05f21035b4218e4d85ece9616 /Source/cmSystemTools.cxx | |
parent | 047acd0c6f6acc004f12e3ad7fa4461688ca7b1f (diff) | |
download | cmake-8cac76825f335148548bb2bb1491b1a220de6187.tar.gz |
Fix bug in borland run command
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 748b95faff..cc24ddb067 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1414,12 +1414,6 @@ bool WindowsRunCommand(const char* command, const char* dir, //main program loop { Sleep(10); - //std::cout << "Check for process..." << std::endl; - GetExitCodeProcess(pi.hProcess,&exit); - -//while the process is running - if (exit != STILL_ACTIVE) break; - //check to see if there is any data to read from stdout //std::cout << "Peek for data..." << std::endl; PeekNamedPipe(read_stdout,buf,1023,&bread,&avail,NULL); @@ -1441,23 +1435,26 @@ bool WindowsRunCommand(const char* command, const char* dir, std::cout << buf << std::flush; } } - output += "\n"; } else { ReadFile(read_stdout,buf,1023,&bread,NULL); output += buf; - output += "\n"; if(verbose) { std::cout << buf << std::flush; - } } } + //std::cout << "Check for process..." << std::endl; + GetExitCodeProcess(pi.hProcess,&exit); + +//while the process is running + if (exit != STILL_ACTIVE) break; + } CloseHandle(pi.hThread); CloseHandle(pi.hProcess); |