Skip to content

Commit 82ec62b

Browse files
fix: cio.Cancel() should close the pipes
PR fixes #8326. Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
1 parent 8f756bc commit 82ec62b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

cio/io_unix.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,14 @@ func copyIO(fifos *FIFOSet, ioset *Streams) (*cio, error) {
9898
config: fifos.Config,
9999
wg: wg,
100100
closers: append(pipes.closers(), fifos),
101-
cancel: cancel,
101+
cancel: func() {
102+
cancel()
103+
for _, c := range pipes.closers() {
104+
if c != nil {
105+
c.Close()
106+
}
107+
}
108+
},
102109
}, nil
103110
}
104111

0 commit comments

Comments
 (0)