| 63 | } |
| 64 | |
| 65 | std::ostream* Coprocess::stdin_pipe () |
| 66 | { |
| 67 | if (!stdin_pipe_ostream) { |
| 68 | int fds[2]; |
| 69 | if (pipe(fds) == -1) { |
| 70 | throw System_error("pipe", "", errno); |
| 71 | } |
| 72 | stdin_pipe_reader = fds[0]; |
| 73 | stdin_pipe_writer = fds[1]; |
| 74 | stdin_pipe_ostream = new ofhstream(this, write_stdin); |
| 75 | } |
| 76 | return stdin_pipe_ostream; |
| 77 | } |
| 78 | |
| 79 | void Coprocess::close_stdin () |
| 80 | { |
no test coverage detected