Skip to content

Commit

Permalink
fix:tty leak
Browse files Browse the repository at this point in the history
Signed-off-by: ningmingxiao <[email protected]>
  • Loading branch information
ningmingxiao committed Dec 16, 2024
1 parent 2207955 commit ec280f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/containerd-shim-runc-v2/runc/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console
buf := bufPool.Get().(*[]byte)
defer bufPool.Put(buf)
io.CopyBuffer(outw, epollConsole, *buf)

// we need to shutdown epollConsole when pipe broken
epollConsole.Shutdown(p.epoller.CloseConsole)
epollConsole.Close()
outw.Close()
outr.Close()
wg.Done()
Expand Down

0 comments on commit ec280f5

Please sign in to comment.