summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-12-05 16:53:17 (GMT)
committerBrad King <brad.king@kitware.com>2003-12-05 16:53:17 (GMT)
commited853b5d70649465370f161b774cf91735a822b3 (patch)
tree23a96d8eba86efd8aa124fd49ca3319689ba02ae /Source/kwsys/ProcessUNIX.c
parent97b469537bffbedf2cfbc9c58f208b2641b1544a (diff)
downloadCMake-ed853b5d70649465370f161b774cf91735a822b3.zip
CMake-ed853b5d70649465370f161b774cf91735a822b3.tar.gz
CMake-ed853b5d70649465370f161b774cf91735a822b3.tar.bz2
ENH: Removed pipe selection argument from WaitForData method in kwsysProcess. This greatly simplifies its use.
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r--Source/kwsys/ProcessUNIX.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 5efd0b9..7e8c617 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -486,8 +486,8 @@ void kwsysProcess_Execute(kwsysProcess* cp)
}
/*--------------------------------------------------------------------------*/
-int kwsysProcess_WaitForData(kwsysProcess* cp, int pipes, char** data,
- int* length, double* userTimeout)
+int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length,
+ double* userTimeout)
{
int i;
int max = -1;
@@ -537,9 +537,9 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, int pipes, char** data,
{
/* This is data on the special termination pipe. Ignore it. */
}
- else if(pipes & (1 << i))
+ else if(data && length)
{
- /* Caller wants this data. Report it. */
+ /* Report this data. */
*data = cp->PipeBuffer;
*length = n;
pipeId = (1 << i);
@@ -687,7 +687,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
}
/* Wait for all the pipes to close. Ignore all data. */
- while((pipe = kwsysProcess_WaitForData(cp, 0, 0, 0, userTimeout)) > 0)
+ while((pipe = kwsysProcess_WaitForData(cp, 0, 0, userTimeout)) > 0)
{
if(pipe == kwsysProcess_Pipe_Timeout)
{