()
| 178 | } |
| 179 | |
| 180 | func newOutputPipe() (*outputPipe, error) { |
| 181 | r, w, err := os.Pipe() |
| 182 | if err != nil { |
| 183 | return nil, err |
| 184 | } |
| 185 | return &outputPipe{r: r, w: w}, nil |
| 186 | } |
| 187 | |
| 188 | // closeWrite drops the parent's copy of the write end so that EOF becomes |
| 189 | // visible once every child copy is closed. |