Function executed for each pipe's thread. Argument is a pointer to the kwsysProcessPipeData instance for this thread. */
| 1477 | the kwsysProcessPipeData instance for this thread. |
| 1478 | */ |
| 1479 | DWORD WINAPI kwsysProcessPipeThreadRead(LPVOID ptd) |
| 1480 | { |
| 1481 | kwsysProcessPipeData* td = (kwsysProcessPipeData*)ptd; |
| 1482 | kwsysProcess* cp = td->Process; |
| 1483 | |
| 1484 | /* Wait for a process to be ready. */ |
| 1485 | while ((WaitForSingleObject(td->Reader.Ready, INFINITE), !cp->Deleting)) { |
| 1486 | /* Read output from the process for this thread's pipe. */ |
| 1487 | kwsysProcessPipeThreadReadPipe(cp, td); |
| 1488 | |
| 1489 | /* Signal the main thread we have reset for a new process. */ |
| 1490 | ReleaseSemaphore(td->Reader.Reset, 1, 0); |
| 1491 | } |
| 1492 | return 0; |
| 1493 | } |
| 1494 | |
| 1495 | /* |
| 1496 | Function called in each pipe's thread to handle data for one |
nothing calls this directly
no test coverage detected