()
| 112 | } |
| 113 | |
| 114 | func (w *WSLProcessController) StdoutPipe() (io.Reader, error) { |
| 115 | w.lock.Lock() |
| 116 | defer w.lock.Unlock() |
| 117 | |
| 118 | if w.started { |
| 119 | return nil, fmt.Errorf("command already started") |
| 120 | } |
| 121 | if w.stdoutPiped { |
| 122 | return nil, fmt.Errorf("stdout already piped") |
| 123 | } |
| 124 | |
| 125 | w.stdoutPiped = true |
| 126 | stdout, err := w.cmd.StdoutPipe() |
| 127 | if err != nil { |
| 128 | return nil, err |
| 129 | } |
| 130 | return stdout, nil |
| 131 | } |
| 132 | |
| 133 | func (w *WSLProcessController) StderrPipe() (io.Reader, error) { |
| 134 | w.lock.Lock() |
nothing calls this directly
no test coverage detected