mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
BUG: Do not close stdout/stderr pipes in parent if they are shared.
This commit is contained in:
@@ -1160,7 +1160,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
|
||||
{
|
||||
kwsysProcessCleanupHandle(&si.StartupInfo.hStdOutput);
|
||||
}
|
||||
if(si.StartupInfo.hStdOutput != GetStdHandle(STD_ERROR_HANDLE))
|
||||
if(si.StartupInfo.hStdError != GetStdHandle(STD_ERROR_HANDLE))
|
||||
{
|
||||
kwsysProcessCleanupHandle(&si.StartupInfo.hStdError);
|
||||
}
|
||||
@@ -1176,7 +1176,10 @@ void kwsysProcess_Execute(kwsysProcess* cp)
|
||||
|
||||
/* Close the inherited handles to the stderr pipe shared by all
|
||||
processes in the pipeline. */
|
||||
kwsysProcessCleanupHandle(&si.StartupInfo.hStdError);
|
||||
if(si.StartupInfo.hStdError != GetStdHandle(STD_ERROR_HANDLE))
|
||||
{
|
||||
kwsysProcessCleanupHandle(&si.StartupInfo.hStdError);
|
||||
}
|
||||
|
||||
/* Restore the working directory. */
|
||||
if(cp->RealWorkingDirectory)
|
||||
|
||||
Reference in New Issue
Block a user