summaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-19 22:09:40 +0100
committerGitHub <noreply@github.com>2020-03-19 22:09:40 +0100
commitaa6c8c2e55a7de14fb22f89af14d5c0636eecee0 (patch)
tree20bb10c738de05c0e323c9ac737d8a7bd5c184f2 /pkg/adapter
parentc1ff17acfa647c62fcb8ca6b8f3d15ff45100fb0 (diff)
parente89c6382ae26b6d611106360fdba4f3f304e5616 (diff)
downloadpodman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.gz
podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.bz2
podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.zip
Merge pull request #5088 from mheon/begin_exec_rework
Begin exec rework
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/terminal_linux.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkg/adapter/terminal_linux.go b/pkg/adapter/terminal_linux.go
index 3dc5864e2..ef5a6f926 100644
--- a/pkg/adapter/terminal_linux.go
+++ b/pkg/adapter/terminal_linux.go
@@ -16,7 +16,6 @@ import (
// ExecAttachCtr execs and attaches to a container
func ExecAttachCtr(ctx context.Context, ctr *libpod.Container, tty, privileged bool, env map[string]string, cmd []string, user, workDir string, streams *libpod.AttachStreams, preserveFDs uint, detachKeys string) (int, error) {
resize := make(chan remotecommand.TerminalSize)
-
haveTerminal := terminal.IsTerminal(int(os.Stdin.Fd()))
// Check if we are attached to a terminal. If we are, generate resize
@@ -33,7 +32,18 @@ func ExecAttachCtr(ctx context.Context, ctr *libpod.Container, tty, privileged b
}
}()
}
- return ctr.Exec(tty, privileged, env, cmd, user, workDir, streams, preserveFDs, resize, detachKeys)
+
+ execConfig := new(libpod.ExecConfig)
+ execConfig.Command = cmd
+ execConfig.Terminal = tty
+ execConfig.Privileged = privileged
+ execConfig.Environment = env
+ execConfig.User = user
+ execConfig.WorkDir = workDir
+ execConfig.DetachKeys = &detachKeys
+ execConfig.PreserveFDs = preserveFDs
+
+ return ctr.Exec(execConfig, streams, resize)
}
// StartAttachCtr starts and (if required) attaches to a container