| 754 | } |
| 755 | |
| 756 | void kwsysProcess_SetPipeNative(kwsysProcess* cp, int pipe, const HANDLE p[2]) |
| 757 | { |
| 758 | HANDLE* pPipeNative = 0; |
| 759 | |
| 760 | if (!cp) { |
| 761 | return; |
| 762 | } |
| 763 | |
| 764 | switch (pipe) { |
| 765 | case kwsysProcess_Pipe_STDIN: |
| 766 | pPipeNative = cp->PipeNativeSTDIN; |
| 767 | break; |
| 768 | case kwsysProcess_Pipe_STDOUT: |
| 769 | pPipeNative = cp->PipeNativeSTDOUT; |
| 770 | break; |
| 771 | case kwsysProcess_Pipe_STDERR: |
| 772 | pPipeNative = cp->PipeNativeSTDERR; |
| 773 | break; |
| 774 | default: |
| 775 | return; |
| 776 | } |
| 777 | |
| 778 | /* Copy the native pipe handles provided. */ |
| 779 | if (p) { |
| 780 | pPipeNative[0] = p[0]; |
| 781 | pPipeNative[1] = p[1]; |
| 782 | } else { |
| 783 | pPipeNative[0] = 0; |
| 784 | pPipeNative[1] = 0; |
| 785 | } |
| 786 | |
| 787 | /* If we are using a native pipe, do not share it or redirect it to |
| 788 | a file. */ |
| 789 | if (p) { |
| 790 | kwsysProcess_SetPipeFile(cp, pipe, 0); |
| 791 | kwsysProcess_SetPipeShared(cp, pipe, 0); |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | int kwsysProcess_GetOption(kwsysProcess* cp, int optionId) |
| 796 | { |
no test coverage detected
searching dependent graphs…