summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-11 13:16:08 +0200
committerGitHub <noreply@github.com>2020-07-11 13:16:08 +0200
commita4e080fd2a98f8c0275c34f5ebba984239634fa3 (patch)
treec1e8eaf585d8a7c98d9ca1abb1d2aa0f95f3466d /pkg
parent1dc0a335fb894af7006cba4dbf67a6ed975ef7ed (diff)
parentbe4b4bd862bb8eb5d0680209db5c060befccfc24 (diff)
downloadpodman-a4e080fd2a98f8c0275c34f5ebba984239634fa3.tar.gz
podman-a4e080fd2a98f8c0275c34f5ebba984239634fa3.tar.bz2
podman-a4e080fd2a98f8c0275c34f5ebba984239634fa3.zip
Merge pull request #6936 from mheon/matt_cant_count
Correctly print STDOUT on non-terminal remote exec
Diffstat (limited to 'pkg')
-rw-r--r--pkg/bindings/containers/attach.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index 077bb244f..297563688 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -457,15 +457,15 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, streams *define.A
switch {
case fd == 0:
- if streams.AttachOutput {
+ if streams.AttachInput {
+ // Write STDIN to STDOUT (echoing characters
+ // typed by another attach session)
if _, err := streams.OutputStream.Write(frame[0:l]); err != nil {
return err
}
}
case fd == 1:
- if streams.AttachInput {
- // Write STDIN to STDOUT (echoing characters
- // typed by another attach session)
+ if streams.AttachOutput {
if _, err := streams.OutputStream.Write(frame[0:l]); err != nil {
return err
}