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
This commit is contained in:
Daniel J Walsh
2018-08-08 15:00:13 -06:00
committed by Atomic Bot
parent 4c63fcc59a
commit a44641d46b

View File

@ -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() {