summaryrefslogtreecommitdiff
path: root/libpod/container_exec.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-09-29 11:16:33 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-09-29 13:44:55 +0200
commit30bf31010e4a6ca4247eef293a4202f6775d6ec9 (patch)
tree441ffbd18ee85a3685cbf54f8d7be4d01adc9553 /libpod/container_exec.go
parent98176f001863fd138025c48625eda5c5adb26972 (diff)
downloadpodman-30bf31010e4a6ca4247eef293a4202f6775d6ec9.tar.gz
podman-30bf31010e4a6ca4247eef293a4202f6775d6ec9.tar.bz2
podman-30bf31010e4a6ca4247eef293a4202f6775d6ec9.zip
libpod: add execSessionNoCopy
To avoid creating an expensive deep copy, create an internal function to access the exec session. [NO TESTS NEEDED] Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod/container_exec.go')
-rw-r--r--libpod/container_exec.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index 1cb45a118..f99fb7d3f 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -747,7 +747,7 @@ func (c *Container) Exec(config *ExecConfig, streams *define.AttachStreams, resi
return -1, err
}
- session, err := c.ExecSession(sessionID)
+ session, err := c.execSessionNoCopy(sessionID)
if err != nil {
if errors.Cause(err) == define.ErrNoSuchExecSession {
// TODO: If a proper Context is ever plumbed in here, we