aboutsummaryrefslogtreecommitdiff
path: root/libpod/oci_conmon_exec_linux.go
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2021-01-14 13:53:28 -0500
committerPeter Hunt <pehunt@redhat.com>2021-04-16 17:45:52 -0400
commitfdfff1dab2131cf53335576df9ece63f7c95c859 (patch)
treeea4708577c7c068038117c73e68621e820f2a058 /libpod/oci_conmon_exec_linux.go
parent6708bc235feb09f5a5bc3f673da1e7c4beee5e12 (diff)
downloadpodman-fdfff1dab2131cf53335576df9ece63f7c95c859.tar.gz
podman-fdfff1dab2131cf53335576df9ece63f7c95c859.tar.bz2
podman-fdfff1dab2131cf53335576df9ece63f7c95c859.zip
oci: use `--full-path` option for conmon
and stop relying on socket path Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'libpod/oci_conmon_exec_linux.go')
-rw-r--r--libpod/oci_conmon_exec_linux.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go
index b43316951..f782193af 100644
--- a/libpod/oci_conmon_exec_linux.go
+++ b/libpod/oci_conmon_exec_linux.go
@@ -284,14 +284,8 @@ func (r *ConmonOCIRuntime) ExecUpdateStatus(ctr *Container, sessionID string) (b
return true, nil
}
-// ExecContainerCleanup cleans up files created when a command is run via
-// ExecContainer. This includes the attach socket for the exec session.
+// ExecContainerCleanup cleans up files created when a command is run via ExecContainer.
func (r *ConmonOCIRuntime) ExecContainerCleanup(ctr *Container, sessionID string) error {
- // Clean up the sockets dir. Issue #3962
- // Also ignore if it doesn't exist for some reason; hence the conditional return below
- if err := os.RemoveAll(filepath.Join(r.socketsDir, sessionID)); err != nil && !os.IsNotExist(err) {
- return err
- }
return nil
}
@@ -302,7 +296,7 @@ func (r *ConmonOCIRuntime) ExecAttachSocketPath(ctr *Container, sessionID string
return "", errors.Wrapf(define.ErrInvalidArg, "must provide a valid session ID to get attach socket path")
}
- return filepath.Join(r.socketsDir, sessionID, "attach"), nil
+ return filepath.Join(ctr.execBundlePath(sessionID), "attach"), nil
}
// This contains pipes used by the exec API.