CloseRead allows commandConn to implement halfCloser
()
| 195 | |
| 196 | // CloseRead allows commandConn to implement halfCloser |
| 197 | func (c *commandConn) CloseRead() error { |
| 198 | // NOTE: maybe already closed here |
| 199 | if err := c.stdout.Close(); err != nil && !ignorableCloseError(err) { |
| 200 | return err |
| 201 | } |
| 202 | c.stdoutClosed.Store(true) |
| 203 | |
| 204 | if c.stdinClosed.Load() { |
| 205 | c.kill() |
| 206 | } |
| 207 | |
| 208 | return nil |
| 209 | } |
| 210 | |
| 211 | // CloseWrite allows commandConn to implement halfCloser |
| 212 | func (c *commandConn) CloseWrite() error { |
no test coverage detected