summaryrefslogtreecommitdiff
path: root/libpod/oci_attach_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-11 05:59:54 -0400
committerGitHub <noreply@github.com>2020-09-11 05:59:54 -0400
commit397de44d487e25b5820777fcbab9728cf2af5e14 (patch)
tree88d76fcd302f91b90c5c622a4391fa859490307c /libpod/oci_attach_linux.go
parentd1798d038376bf494f19b1531b9e0450592b24b9 (diff)
parent4c155d36cba90fd07f75c6d7d6f09848b88dac4a (diff)
downloadpodman-397de44d487e25b5820777fcbab9728cf2af5e14.tar.gz
podman-397de44d487e25b5820777fcbab9728cf2af5e14.tar.bz2
podman-397de44d487e25b5820777fcbab9728cf2af5e14.zip
Merge pull request #7592 from mheon/force_attach_winch
Force Attach() to send a SIGWINCH and redraw
Diffstat (limited to 'libpod/oci_attach_linux.go')
-rw-r--r--libpod/oci_attach_linux.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go
index 622c613d9..74af449ed 100644
--- a/libpod/oci_attach_linux.go
+++ b/libpod/oci_attach_linux.go
@@ -31,7 +31,7 @@ const (
// Attach to the given container
// Does not check if state is appropriate
// started is only required if startContainer is true
-func (c *Container) attach(streams *define.AttachStreams, keys string, resize <-chan remotecommand.TerminalSize, startContainer bool, started chan bool) error {
+func (c *Container) attach(streams *define.AttachStreams, keys string, resize <-chan remotecommand.TerminalSize, startContainer bool, started chan bool, attachRdy chan<- bool) error {
if !streams.AttachOutput && !streams.AttachError && !streams.AttachInput {
return errors.Wrapf(define.ErrInvalidArg, "must provide at least one stream to attach to")
}
@@ -74,6 +74,9 @@ func (c *Container) attach(streams *define.AttachStreams, keys string, resize <-
}
receiveStdoutError, stdinDone := setupStdioChannels(streams, conn, detachKeys)
+ if attachRdy != nil {
+ attachRdy <- true
+ }
return readStdio(streams, receiveStdoutError, stdinDone)
}