diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-08-08 15:00:13 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-09 14:14:40 +0000 |
commit | a44641d46b581c8213455ecaec197c0910fb6d87 (patch) | |
tree | 76bc90f8e2acae8cb38d30e3b7a0e59bc56502b7 /libpod | |
parent | 4c63fcc59ab348e43169c777d037ec01277f1980 (diff) | |
download | podman-a44641d46b581c8213455ecaec197c0910fb6d87.tar.gz podman-a44641d46b581c8213455ecaec197c0910fb6d87.tar.bz2 podman-a44641d46b581c8213455ecaec197c0910fb6d87.zip |
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 <dwalsh@redhat.com>
Closes: #1239
Approved by: mheon
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_attach.go | 8 |
1 files changed, 3 insertions, 5 deletions
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() { |