From a44641d46b581c8213455ecaec197c0910fb6d87 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 8 Aug 2018 15:00:13 -0600 Subject: Always connect to the stdout and stderr of stream If the stdout and stderr are not attach, podman will at least get a messsage that the container has completed and finish. This fixes the `podman run -a stdin fedora true` Hang issue. Signed-off-by: Daniel J Walsh Closes: #1239 Approved by: mheon --- libpod/container_attach.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libpod') diff --git a/libpod/container_attach.go b/libpod/container_attach.go index 29e2d2fa6..5bfea3a0e 100644 --- a/libpod/container_attach.go +++ b/libpod/container_attach.go @@ -96,11 +96,9 @@ func (c *Container) attachContainerSocket(resize <-chan remotecommand.TerminalSi } receiveStdoutError := make(chan error) - if streams.AttachOutput || streams.AttachError { - go func() { - receiveStdoutError <- redirectResponseToOutputStreams(streams.OutputStream, streams.ErrorStream, streams.AttachOutput, streams.AttachError, conn) - }() - } + go func() { + receiveStdoutError <- redirectResponseToOutputStreams(streams.OutputStream, streams.ErrorStream, streams.AttachOutput, streams.AttachError, conn) + }() stdinDone := make(chan error) go func() { -- cgit v1.2.3-54-g00ecf