Files
podman/pkg/bindings/containers/term_unix.go
Matt Heon 72f1617fac Bump Go module to v5
Moving from Go module v4 to v5 prepares us for public releases.

Move done using gomove [1] as with the v3 and v4 moves.

[1] https://github.com/KSubedi/gomove

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-08 09:35:39 -05:00

25 lines
521 B
Go

//go:build !windows
package containers
import (
"context"
"os"
"os/signal"
sig "github.com/containers/podman/v5/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()))
}