| 558 | } |
| 559 | |
| 560 | void kwsysProcess_SetPipeShared(kwsysProcess* cp, int prPipe, int shared) |
| 561 | { |
| 562 | if (!cp) { |
| 563 | return; |
| 564 | } |
| 565 | |
| 566 | switch (prPipe) { |
| 567 | case kwsysProcess_Pipe_STDIN: |
| 568 | cp->PipeSharedSTDIN = shared ? 1 : 0; |
| 569 | break; |
| 570 | case kwsysProcess_Pipe_STDOUT: |
| 571 | cp->PipeSharedSTDOUT = shared ? 1 : 0; |
| 572 | break; |
| 573 | case kwsysProcess_Pipe_STDERR: |
| 574 | cp->PipeSharedSTDERR = shared ? 1 : 0; |
| 575 | break; |
| 576 | default: |
| 577 | return; |
| 578 | } |
| 579 | |
| 580 | /* If we are sharing the pipe, do not redirect it to a file or use a |
| 581 | native pipe. */ |
| 582 | if (shared) { |
| 583 | kwsysProcess_SetPipeFile(cp, prPipe, 0); |
| 584 | kwsysProcess_SetPipeNative(cp, prPipe, 0); |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | void kwsysProcess_SetPipeNative(kwsysProcess* cp, int prPipe, int const p[2]) |
| 589 | { |
searching dependent graphs…