Files
podman/pkg/bindings/containers/term_unix.go
Paul Holzinger 56d6ee0808 move golang.org/x/crypto/ssh/terminal to golang.org/x/term
golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to
golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just
calling golang.org/x/term itslef so there are no functional changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:40:52 +02:00

26 lines
540 B
Go

//go:build !windows
// +build !windows
package containers
import (
"context"
"os"
"os/signal"
sig "github.com/containers/podman/v4/pkg/signal"
"golang.org/x/term"
)
func makeRawTerm(stdin *os.File) (*term.State, error) {
return term.MakeRaw(int(stdin.Fd()))
}
func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.File, stdout *os.File) {
signal.Notify(winChange, sig.SIGWINCH)
}
func getTermSize(stdin *os.File, stdout *os.File) (width, height int, err error) {
return term.GetSize(int(stdin.Fd()))
}