fix: cio.Cancel() should close the pipes
PR fixes #8326. Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
This commit is contained in:
parent
8f756bc8c2
commit
82ec62b865
@ -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