| 586 | } |
| 587 | |
| 588 | void kwsysProcess_SetPipeNative(kwsysProcess* cp, int prPipe, int const p[2]) |
| 589 | { |
| 590 | int* pPipeNative = 0; |
| 591 | |
| 592 | if (!cp) { |
| 593 | return; |
| 594 | } |
| 595 | |
| 596 | switch (prPipe) { |
| 597 | case kwsysProcess_Pipe_STDIN: |
| 598 | pPipeNative = cp->PipeNativeSTDIN; |
| 599 | break; |
| 600 | case kwsysProcess_Pipe_STDOUT: |
| 601 | pPipeNative = cp->PipeNativeSTDOUT; |
| 602 | break; |
| 603 | case kwsysProcess_Pipe_STDERR: |
| 604 | pPipeNative = cp->PipeNativeSTDERR; |
| 605 | break; |
| 606 | default: |
| 607 | return; |
| 608 | } |
| 609 | |
| 610 | /* Copy the native pipe descriptors provided. */ |
| 611 | if (p) { |
| 612 | pPipeNative[0] = p[0]; |
| 613 | pPipeNative[1] = p[1]; |
| 614 | } else { |
| 615 | pPipeNative[0] = -1; |
| 616 | pPipeNative[1] = -1; |
| 617 | } |
| 618 | |
| 619 | /* If we are using a native pipe, do not share it or redirect it to |
| 620 | a file. */ |
| 621 | if (p) { |
| 622 | kwsysProcess_SetPipeFile(cp, prPipe, 0); |
| 623 | kwsysProcess_SetPipeShared(cp, prPipe, 0); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | int kwsysProcess_GetOption(kwsysProcess* cp, int optionId) |
| 628 | { |
no test coverage detected
searching dependent graphs…