Read implements io.Reader. Data is read from the read pipe.
(p []byte)
| 38 | |
| 39 | // Read implements io.Reader. Data is read from the read pipe. |
| 40 | func (b BidirectionalPipe) Read(p []byte) (int, error) { |
| 41 | n, err := b.read.Read(p) |
| 42 | if err != nil { |
| 43 | return n, xerrors.Errorf("read from pipe_read (fd=%v): %w", b.read.Fd(), err) |
| 44 | } |
| 45 | return n, nil |
| 46 | } |
| 47 | |
| 48 | // Write implements io.Writer. Data is written to the write pipe. |
| 49 | func (b BidirectionalPipe) Write(p []byte) (n int, err error) { |