diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-23 19:26:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 19:26:20 +0200 |
commit | bb253af3fdc9928388bab1fb2063e7d0b79a5e4b (patch) | |
tree | 0e35bba61c97582527f9bd02cd48ad1b70e75c6f /pkg/adapter | |
parent | ce60c4d30c4acfa0c3ec9fc584c7eb88f84ac35f (diff) | |
parent | a793bccae6d568d3f30534d66bea3d5a1e8d9302 (diff) | |
download | podman-bb253af3fdc9928388bab1fb2063e7d0b79a5e4b.tar.gz podman-bb253af3fdc9928388bab1fb2063e7d0b79a5e4b.tar.bz2 podman-bb253af3fdc9928388bab1fb2063e7d0b79a5e4b.zip |
Merge pull request #3630 from baude/golangcilint5
golangci-lint cleanup
Diffstat (limited to 'pkg/adapter')
-rw-r--r-- | pkg/adapter/terminal_linux.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/adapter/terminal_linux.go b/pkg/adapter/terminal_linux.go index 33ca0833b..de2600b75 100644 --- a/pkg/adapter/terminal_linux.go +++ b/pkg/adapter/terminal_linux.go @@ -27,7 +27,11 @@ func ExecAttachCtr(ctx context.Context, ctr *libpod.Container, tty, privileged b return -1, err } defer cancel() - defer restoreTerminal(oldTermState) + defer func() { + if err := restoreTerminal(oldTermState); err != nil { + logrus.Errorf("unable to restore terminal: %q", err) + } + }() } return ctr.Exec(tty, privileged, env, cmd, user, workDir, streams, preserveFDs, resize, detachKeys) } @@ -121,7 +125,7 @@ func handleTerminalAttach(ctx context.Context, resize chan remotecommand.Termina logrus.SetFormatter(&RawTtyFormatter{}) if _, err := term.SetRawTerminal(os.Stdin.Fd()); err != nil { - return nil, nil, err + return cancel, nil, err } return cancel, oldTermState, nil |