summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-02-27 09:50:22 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-01 21:17:50 +0000
commit345bfafee27870cdcb21bcd2ee7e7825b99818a0 (patch)
treee7ecbf11861284e555da984d1232ca2bb9acf25f /libpod/container_api.go
parent2a0c949b9bab88f4e05d39b5e6d7db62bb39df11 (diff)
downloadpodman-345bfafee27870cdcb21bcd2ee7e7825b99818a0.tar.gz
podman-345bfafee27870cdcb21bcd2ee7e7825b99818a0.tar.bz2
podman-345bfafee27870cdcb21bcd2ee7e7825b99818a0.zip
Rework exec to enable splitting to retrieve exec PID
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #412 Approved by: baude
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 9011454fa..b7e523d7a 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -2,13 +2,11 @@ package libpod
import (
"encoding/json"
- "fmt"
"io/ioutil"
"os"
"path/filepath"
"github.com/docker/docker/daemon/caps"
- "github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod/driver"
@@ -236,21 +234,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e
if privileged || c.config.Privileged {
capList = caps.GetAllCapabilities()
}
- globalOpts := runcGlobalOptions{
- log: c.LogPath(),
- }
-
- execOpts := runcExecOptions{
- capAdd: capList,
- pidFile: filepath.Join(c.state.RunDir, fmt.Sprintf("%s-execpid", stringid.GenerateNonCryptoID()[:12])),
- env: env,
- noNewPrivs: c.config.Spec.Process.NoNewPrivileges,
- user: user,
- cwd: c.config.Spec.Process.Cwd,
- tty: tty,
- }
- return c.runtime.ociRuntime.execContainer(c, cmd, globalOpts, execOpts)
+ return c.runtime.ociRuntime.execContainer(c, cmd, tty, user, capList, env)
}
// Attach attaches to a container