| 164 | } |
| 165 | |
| 166 | size_t Coprocess::write_stdin (void* handle, const void* buf, size_t count) |
| 167 | { |
| 168 | const int fd = static_cast<Coprocess*>(handle)->stdin_pipe_writer; |
| 169 | ssize_t ret; |
| 170 | while ((ret = write(fd, buf, count)) == -1 && errno == EINTR); // restart if interrupted |
| 171 | if (ret < 0) { |
| 172 | throw System_error("write", "", errno); |
| 173 | } |
| 174 | return ret; |
| 175 | } |
| 176 | |
| 177 | size_t Coprocess::read_stdout (void* handle, void* buf, size_t count) |
| 178 | { |
nothing calls this directly
no test coverage detected