diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-19 22:09:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 22:09:40 +0100 |
commit | aa6c8c2e55a7de14fb22f89af14d5c0636eecee0 (patch) | |
tree | 20bb10c738de05c0e323c9ac737d8a7bd5c184f2 /libpod/oci_attach_linux.go | |
parent | c1ff17acfa647c62fcb8ca6b8f3d15ff45100fb0 (diff) | |
parent | e89c6382ae26b6d611106360fdba4f3f304e5616 (diff) | |
download | podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.gz podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.tar.bz2 podman-aa6c8c2e55a7de14fb22f89af14d5c0636eecee0.zip |
Merge pull request #5088 from mheon/begin_exec_rework
Begin exec rework
Diffstat (limited to 'libpod/oci_attach_linux.go')
-rw-r--r-- | libpod/oci_attach_linux.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libpod/oci_attach_linux.go b/libpod/oci_attach_linux.go index 46c70e7eb..5fc46c31c 100644 --- a/libpod/oci_attach_linux.go +++ b/libpod/oci_attach_linux.go @@ -93,7 +93,7 @@ func (c *Container) attach(streams *AttachStreams, keys string, resize <-chan re // 4. attachToExec sends on startFd, signalling it has attached to the socket and child is ready to go // 5. child receives on startFd, runs the runtime exec command // attachToExec is responsible for closing startFd and attachFd -func (c *Container) attachToExec(streams *AttachStreams, keys string, resize <-chan remotecommand.TerminalSize, sessionID string, startFd, attachFd *os.File) error { +func (c *Container) attachToExec(streams *AttachStreams, keys *string, sessionID string, startFd, attachFd *os.File) error { if !streams.AttachOutput && !streams.AttachError && !streams.AttachInput { return errors.Wrapf(define.ErrInvalidArg, "must provide at least one stream to attach to") } @@ -104,7 +104,11 @@ func (c *Container) attachToExec(streams *AttachStreams, keys string, resize <-c defer errorhandling.CloseQuiet(startFd) defer errorhandling.CloseQuiet(attachFd) - detachKeys, err := processDetachKeys(keys) + detachString := define.DefaultDetachKeys + if keys != nil { + detachString = *keys + } + detachKeys, err := processDetachKeys(detachString) if err != nil { return err } @@ -134,10 +138,6 @@ func (c *Container) attachToExec(streams *AttachStreams, keys string, resize <-c } }() - // Register the resize func after we've read the attach socket, as we know at this point the - // 'ctl' file has been created in conmon - registerResizeFunc(resize, c.execBundlePath(sessionID)) - // start listening on stdio of the process receiveStdoutError, stdinDone := setupStdioChannels(streams, conn, detachKeys) |