summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-07-07 13:05:59 (GMT)
committerBrad King <brad.king@kitware.com>2005-07-07 13:05:59 (GMT)
commit7e7249cbd185156e2e3d31f434519696a923b8e1 (patch)
tree7f754ab9a9f2916d4a0a6c1974dac4d59f4ca7fd /Source/kwsys
parent132eaa1ab3fa5c81c3e337049cfb60455039d2fc (diff)
downloadCMake-7e7249cbd185156e2e3d31f434519696a923b8e1.zip
CMake-7e7249cbd185156e2e3d31f434519696a923b8e1.tar.gz
CMake-7e7249cbd185156e2e3d31f434519696a923b8e1.tar.bz2
BUG: Fixed reusability of process object by clearing each pipe's Closed flag when cleaning up.
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/ProcessWin32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 8547782..bb7e5fe 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -1431,7 +1431,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
}
/* When the last pipe closes in WaitForData, the loop terminates
- without releaseing the pipe's thread. Release it now. */
+ without releasing the pipe's thread. Release it now. */
if(cp->CurrentIndex < KWSYSPE_PIPE_COUNT)
{
ReleaseSemaphore(cp->Pipe[cp->CurrentIndex].Reader.Go, 1, 0);
@@ -2076,6 +2076,7 @@ void kwsysProcessCleanup(kwsysProcess* cp, int error)
{
kwsysProcessCleanupHandle(&cp->Pipe[i].Write);
kwsysProcessCleanupHandle(&cp->Pipe[i].Read);
+ cp->Pipe[i].Closed = 0;
}
}