[cmake-commits] hoffman committed cmSystemTools.cxx 1.347 1.348

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Sep 25 10:57:51 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6383

Modified Files:
	cmSystemTools.cxx 
Log Message:
BUG: fix problem with stdout and stderr not showing up in ms dos shells


Index: cmSystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSystemTools.cxx,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -d -r1.347 -r1.348
--- cmSystemTools.cxx	24 Sep 2007 17:21:25 -0000	1.347
+++ cmSystemTools.cxx	25 Sep 2007 14:57:49 -0000	1.348
@@ -1979,7 +1979,17 @@
 
 void cmSystemTools::DoNotInheritStdPipes()
 {   
-#ifdef _WIN32
+#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,



More information about the Cmake-commits mailing list