Browse Source

BUG: fix problem with stdout and stderr not showing up in ms dos shells

pull/1/head
Bill Hoffman 18 years ago
parent
commit
9c3ffe2474
  1. 10
      Source/cmSystemTools.cxx

10
Source/cmSystemTools.cxx

@ -1980,6 +1980,16 @@ int cmSystemTools::WaitForLine(cmsysProcess* process, std::string& line,
void cmSystemTools::DoNotInheritStdPipes()
{
#ifdef _WIN32
// Check to see if we are attached to a console
// if so, then do not stop the inherited pipes
// or stdout and stderr will not show up in dos
// shell windows
CONSOLE_SCREEN_BUFFER_INFO hOutInfo;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
if(GetConsoleScreenBufferInfo(hOut, &hOutInfo))
{
return;
}
{
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
DuplicateHandle(GetCurrentProcess(), out,

Loading…
Cancel
Save