github.com/sams1990/dockerrepo@v17.12.1-ce-rc2+incompatible/libcontainerd/io.go (about) 1 package libcontainerd 2 3 import "github.com/containerd/containerd/cio" 4 5 // Config returns the containerd.IOConfig of this pipe set 6 func (p *IOPipe) Config() cio.Config { 7 return p.config 8 } 9 10 // Cancel aborts ongoing operations if they have not completed yet 11 func (p *IOPipe) Cancel() { 12 p.cancel() 13 } 14 15 // Wait waits for io operations to finish 16 func (p *IOPipe) Wait() { 17 } 18 19 // Close closes the underlying pipes 20 func (p *IOPipe) Close() error { 21 p.cancel() 22 23 if p.Stdin != nil { 24 p.Stdin.Close() 25 } 26 27 if p.Stdout != nil { 28 p.Stdout.Close() 29 } 30 31 if p.Stderr != nil { 32 p.Stderr.Close() 33 } 34 35 return nil 36 }