summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-04 11:11:01 -0500
committerGitHub <noreply@github.com>2020-03-04 11:11:01 -0500
commit83895524959750e16da2fd43b9da6389b4e20b46 (patch)
treeece55b81c619e8f0a3ef004f588515e52d79eec1 /libpod/container_internal.go
parentce7ed2205a6a2a4557b14a3e1e818839c7c8bbfd (diff)
parentd3d97a25e8c87cf741b2e24ac01ef84962137106 (diff)
downloadpodman-83895524959750e16da2fd43b9da6389b4e20b46.tar.gz
podman-83895524959750e16da2fd43b9da6389b4e20b46.tar.bz2
podman-83895524959750e16da2fd43b9da6389b4e20b46.zip
Merge pull request #5373 from haircommander/exec-pipe-ec
exec: get the exit code from sync pipe instead of file
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index ff43bfc8f..67e02cc31 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -206,28 +206,6 @@ func (c *Container) execOCILog(sessionID string) string {
return filepath.Join(c.execBundlePath(sessionID), "oci-log")
}
-// readExecExitCode reads the exit file for an exec session and returns
-// the exit code
-func (c *Container) readExecExitCode(sessionID string) (int, error) {
- exitFile := filepath.Join(c.execExitFileDir(sessionID), c.ID())
- chWait := make(chan error)
- defer close(chWait)
-
- _, err := WaitForFile(exitFile, chWait, time.Second*5)
- if err != nil {
- return -1, err
- }
- ec, err := ioutil.ReadFile(exitFile)
- if err != nil {
- return -1, err
- }
- ecInt, err := strconv.Atoi(string(ec))
- if err != nil {
- return -1, err
- }
- return ecInt, nil
-}
-
// Wait for the container's exit file to appear.
// When it does, update our state based on it.
func (c *Container) waitForExitFileAndSync() error {