diff options
author | Brad King <brad.king@kitware.com> | 2003-12-07 19:09:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-12-07 19:09:58 (GMT) |
commit | b777b8656e2ea28a165c22a3c1f7a1a1dd1b11a7 (patch) | |
tree | 110e32b1ff34d4ef72c411e68c403bb1a77973b9 /Source/kwsys/ProcessUNIX.c | |
parent | 21c5c6c81d753ddc50e1bb1236a08ff014ffba69 (diff) | |
download | CMake-b777b8656e2ea28a165c22a3c1f7a1a1dd1b11a7.zip CMake-b777b8656e2ea28a165c22a3c1f7a1a1dd1b11a7.tar.gz CMake-b777b8656e2ea28a165c22a3c1f7a1a1dd1b11a7.tar.bz2 |
ENH: Cleaned up pipe numbering.
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 7e8c617..cf0fb73 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -497,7 +497,7 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length, kwsysProcessTime userStartTime; int user = 0; int expired = 0; - int pipeId = 0; + int pipeId = kwsysProcess_Pipe_None; int numReady = 0; /* Record the time at which user timeout period starts. */ @@ -542,7 +542,13 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length, /* Report this data. */ *data = cp->PipeBuffer; *length = n; - pipeId = (1 << i); + switch(i) + { + case KWSYSPE_PIPE_STDOUT: + pipeId = kwsysProcess_Pipe_STDOUT; break; + case KWSYSPE_PIPE_STDERR: + pipeId = kwsysProcess_Pipe_STDERR; break; + }; break; } } @@ -663,13 +669,13 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length, cp->Killed = 0; cp->TimeoutExpired = 1; cp->PipesLeft = 0; - return 0; + return kwsysProcess_Pipe_None; } } else { /* No pipes are left open. */ - return 0; + return kwsysProcess_Pipe_None; } } |