diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-28 13:18:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 13:18:05 -0800 |
commit | a680144f717bd86d27cd53bbd36c8e847b8bdb00 (patch) | |
tree | 72d0207661126c4b4b885862f1dad78fa4415c21 /libpod/container_api.go | |
parent | af848ae377f25faf59a9c1bfefb9f7011eb0fe0c (diff) | |
parent | d780e69559d8aa117e154a234d10f2112c32c8be (diff) | |
download | podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.tar.gz podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.tar.bz2 podman-a680144f717bd86d27cd53bbd36c8e847b8bdb00.zip |
Merge pull request #2487 from haircommander/exec_attahc
Allow Exec API user to override streams
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 09d7f220d..6bef3c47d 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -203,9 +203,8 @@ func (c *Container) Kill(signal uint) error { } // Exec starts a new process inside the container -// TODO allow specifying streams to attach to // TODO investigate allowing exec without attaching -func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir string) error { +func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir string, streams *AttachStreams) error { var capList []string locked := false @@ -267,7 +266,7 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir logrus.Debugf("Creating new exec session in container %s with session id %s", c.ID(), sessionID) - execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, workDir, hostUser, sessionID) + execCmd, err := c.runtime.ociRuntime.execContainer(c, cmd, capList, env, tty, workDir, hostUser, sessionID, streams) if err != nil { return errors.Wrapf(err, "error exec %s", c.ID()) } |