mirror of
https://github.com/containers/podman.git
synced 2025-06-03 20:33:20 +08:00
Ensure that exec sends resize events
We previously tried to send resize events only after the exec session successfully started, which makes sense (we might drop an event or two that came in before the exec session started otherwise). However, the start function blocks, so waiting actually means we send no resize events at all, which is obviously worse than losing a few.. Sending resizes before attach starts seems to work fine in my testing, so let's do that until we get bug reports that it doesn't work. Fixes #5584 Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
@ -793,7 +793,6 @@ func (r *ConmonOCIRuntime) ExecAttachResize(ctr *Container, sessionID string, ne
|
||||
}
|
||||
defer controlFile.Close()
|
||||
|
||||
logrus.Debugf("Received a resize event for container %s exec session %s: %+v", ctr.ID(), sessionID, newSize)
|
||||
if _, err = fmt.Fprintf(controlFile, "%d %d %d\n", 1, newSize.Height, newSize.Width); err != nil {
|
||||
return errors.Wrapf(err, "failed to write to ctl file to resize terminal")
|
||||
}
|
||||
|
Reference in New Issue
Block a user