summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/containers.go
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/varlinkapi/containers.go
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/varlinkapi/containers.go')
-rw-r--r--pkg/varlinkapi/containers.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 94726bbbd..55427771c 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -846,11 +846,6 @@ func (i *LibpodAPI) ExecContainer(call iopodman.VarlinkCall, opts iopodman.ExecO
workDir = *opts.Workdir
}
- var detachKeys string
- if opts.DetachKeys != nil {
- detachKeys = *opts.DetachKeys
- }
-
resizeChan := make(chan remotecommand.TerminalSize)
reader, writer, _, pipeWriter, streams := setupStreams(call)
@@ -870,8 +865,17 @@ func (i *LibpodAPI) ExecContainer(call iopodman.VarlinkCall, opts iopodman.ExecO
}
}()
+ execConfig := new(libpod.ExecConfig)
+ execConfig.Command = opts.Cmd
+ execConfig.Terminal = opts.Tty
+ execConfig.Privileged = opts.Privileged
+ execConfig.Environment = envs
+ execConfig.User = user
+ execConfig.WorkDir = workDir
+ execConfig.DetachKeys = opts.DetachKeys
+
go func() {
- ec, err := ctr.Exec(opts.Tty, opts.Privileged, envs, opts.Cmd, user, workDir, streams, 0, resizeChan, detachKeys)
+ ec, err := ctr.Exec(execConfig, streams, resizeChan)
if err != nil {
logrus.Errorf(err.Error())
}