diff options
author | Brad King <brad.king@kitware.com> | 2003-12-05 16:53:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-12-05 16:53:17 (GMT) |
commit | ed853b5d70649465370f161b774cf91735a822b3 (patch) | |
tree | 23a96d8eba86efd8aa124fd49ca3319689ba02ae /Source/kwsys/ProcessUNIX.c | |
parent | 97b469537bffbedf2cfbc9c58f208b2641b1544a (diff) | |
download | CMake-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.c | 10 |
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) { |