diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-09-29 11:16:33 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-09-29 13:44:55 +0200 |
commit | 30bf31010e4a6ca4247eef293a4202f6775d6ec9 (patch) | |
tree | 441ffbd18ee85a3685cbf54f8d7be4d01adc9553 /libpod/container_exec.go | |
parent | 98176f001863fd138025c48625eda5c5adb26972 (diff) | |
download | podman-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.go | 2 |
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 |