mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00

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>
25 lines
521 B
Go
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()))
|
|
}
|