summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-07 11:43:52 +0000
committerGitHub <noreply@github.com>2022-07-07 11:43:52 +0000
commitf3533a312fb4b2f0eb88e9d53fb31d1580b182a6 (patch)
tree35e1bc11a9c5e9ee4740d3af642b511fe0de65be /pkg/bindings
parent13070dc186d4083aa2b4f55781cd79ea6d577022 (diff)
parentcc6faddfaaa7dad7e07e3113e14328d625636ace (diff)
downloadpodman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.tar.gz
podman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.tar.bz2
podman-f3533a312fb4b2f0eb88e9d53fb31d1580b182a6.zip
Merge pull request #14841 from Luap99/common-code
use c/common code for resize and CopyDetachable
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/containers/attach.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index 303fc65bd..2bfccdd3b 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -14,9 +14,9 @@ import (
"strconv"
"time"
+ "github.com/containers/common/pkg/util"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/bindings"
- "github.com/containers/podman/v4/utils"
"github.com/moby/term"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -159,7 +159,7 @@ func Attach(ctx context.Context, nameOrID string, stdin io.Reader, stdout io.Wri
go func() {
logrus.Debugf("Copying STDIN to socket")
- _, err := utils.CopyDetachable(socket, stdin, detachKeysInBytes)
+ _, err := util.CopyDetachable(socket, stdin, detachKeysInBytes)
if err != nil && err != define.ErrDetach {
logrus.Errorf("Failed to write input to service: %v", err)
}
@@ -497,7 +497,7 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, options *ExecStar
if options.GetAttachInput() {
go func() {
logrus.Debugf("Copying STDIN to socket")
- _, err := utils.CopyDetachable(socket, options.InputStream, []byte{})
+ _, err := util.CopyDetachable(socket, options.InputStream, []byte{})
if err != nil {
logrus.Errorf("Failed to write input to service: %v", err)
}
@@ -518,7 +518,7 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, options *ExecStar
return fmt.Errorf("exec session %s has a terminal and must have STDOUT enabled", sessionID)
}
// If not multiplex'ed, read from server and write to stdout
- _, err := utils.CopyDetachable(options.GetOutputStream(), socket, []byte{})
+ _, err := util.CopyDetachable(options.GetOutputStream(), socket, []byte{})
if err != nil {
return err
}