From acd9c668647d273488772bfcb06a0f1a44dfb411 Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 8 Nov 2017 15:14:33 -0600 Subject: Fix terminal attach Re-order the startup of a new container via run from initialize > start > attach to initialize > attach > start. This fixes output when running: kpod run -i -t IMAGE command and kpod run IMAGE command Signed-off-by: baude --- libpod/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpod/container.go') diff --git a/libpod/container.go b/libpod/container.go index 7c2f921f3..d93efda97 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -393,7 +393,7 @@ func (c *Container) Exec(cmd []string, tty bool, stdin bool) (string, error) { // Attach attaches to a container // Returns fully qualified URL of streaming server for the container -func (c *Container) Attach(noStdin bool, keys string) error { +func (c *Container) Attach(noStdin bool, keys string, attached chan<- bool) error { // Check the validity of the provided keys first var err error detachKeys := []byte{} @@ -410,7 +410,7 @@ func (c *Container) Attach(noStdin bool, keys string) error { } resize := make(chan remotecommand.TerminalSize) defer close(resize) - err = c.attachContainerSocket(resize, noStdin, detachKeys) + err = c.attachContainerSocket(resize, noStdin, detachKeys, attached) if err != nil { return err } -- cgit v1.2.3-54-g00ecf