Call CreateProcess with bInheritHandles = TRUE.
authorMikhail Glushenkov <foldr@codedgers.com>
Tue, 14 Apr 2009 21:31:36 +0000 (21:31 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Tue, 14 Apr 2009 21:31:36 +0000 (21:31 +0000)
Makes llvmc show error messages printed by child processes when run from the
Cygwin/MSYS shell. Since ExecuteAndWait does not return until the child program
has finished execution, this change should be harmless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69082 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Win32/Program.inc

index e74b41cde179e2d937f5d853c60e6241be4e12c0..49086b8348e6a07c8cd99dc88ae47a9d1d14d99f 100644 (file)
@@ -226,7 +226,7 @@ Program::ExecuteAndWait(const Path& path,
 
   fflush(stdout);
   fflush(stderr);
-  BOOL rc = CreateProcess(path.c_str(), command, NULL, NULL, FALSE, 0,
+  BOOL rc = CreateProcess(path.c_str(), command, NULL, NULL, TRUE, 0,
                           envblock, NULL, &si, &pi);
   DWORD err = GetLastError();