diff options
author | Brad King <brad.king@kitware.com> | 2005-04-21 20:05:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-21 20:05:09 (GMT) |
commit | 8567e7d0bc0595824cfd99ecc1e31b23ad189e8a (patch) | |
tree | 69323777aa38bd7405010bd888b816d59ac64e20 /Source/kwsys/ProcessWin32.c | |
parent | 3f224b755805cac375fecb13da08c17b188fae01 (diff) | |
download | CMake-8567e7d0bc0595824cfd99ecc1e31b23ad189e8a.zip CMake-8567e7d0bc0595824cfd99ecc1e31b23ad189e8a.tar.gz CMake-8567e7d0bc0595824cfd99ecc1e31b23ad189e8a.tar.bz2 |
BUG: Do not close stdout/stderr pipes in parent if they are shared.
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 730448a..922da17 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -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) |