Close implements io.Closer. Both the read and write pipes are closed.
()
| 56 | |
| 57 | // Close implements io.Closer. Both the read and write pipes are closed. |
| 58 | func (b BidirectionalPipe) Close() error { |
| 59 | var err error |
| 60 | rErr := b.read.Close() |
| 61 | if rErr != nil { |
| 62 | err = multierror.Append(err, xerrors.Errorf("close pipe_read (fd=%v): %w", b.read.Fd(), rErr)) |
| 63 | } |
| 64 | wErr := b.write.Close() |
| 65 | if err != nil { |
| 66 | err = multierror.Append(err, xerrors.Errorf("close pipe_write (fd=%v): %w", b.write.Fd(), wErr)) |
| 67 | } |
| 68 | return err |
| 69 | } |
no test coverage detected