Merge pull request #16117 from alexlarsson/container-terminal-helper

Add and use libpod/Container.Terminal() helper
This commit is contained in:
OpenShift Merge Robot
2022-10-11 16:18:02 -04:00
committed by GitHub
6 changed files with 17 additions and 13 deletions

View File

@ -274,7 +274,7 @@ func (c *Container) Attach(streams *define.AttachStreams, keys string, resize <-
// Send a SIGWINCH after attach succeeds so that most programs will
// redraw the screen for the new attach session.
attachRdy := make(chan bool, 1)
if c.config.Spec.Process != nil && c.config.Spec.Process.Terminal {
if c.Terminal() {
go func() {
<-attachRdy
if err := c.ociRuntime.KillContainer(c, uint(signal.SIGWINCH), false); err != nil {