Merge pull request #8334 from davidhsingyuchen/fix-io-cancel
fix: cio.Cancel() should close the pipes
This commit is contained in:
commit
9e834e761a
@ -98,7 +98,14 @@ func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
|
||||
config: fifos.Config,
|
||||
wg: wg,
|
||||
closers: append(pipes.closers(), fifos),
|
||||
cancel: cancel,
|
||||
cancel: func() {
|
||||
cancel()
|
||||
for _, c := range pipes.closers() {
|
||||
if c != nil {
|
||||
c.Close()
|
||||
}
|
||||
}
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user