MCPcopy Create free account
hub / github.com/Kitware/VTK / kwsysProcessPipeThreadRead

Function kwsysProcessPipeThreadRead

Utilities/KWSys/vtksys/ProcessWin32.c:1479–1493  ·  view source on GitHub ↗

Function executed for each pipe's thread. Argument is a pointer to the kwsysProcessPipeData instance for this thread. */

Source from the content-addressed store, hash-verified

1477 the kwsysProcessPipeData instance for this thread.
1478*/
1479DWORD 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

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected