diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-17 02:30:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 02:30:54 -0700 |
commit | 3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0 (patch) | |
tree | 6fe1fe47414717662d14a6e223e26ef803517f92 /vendor/github.com/mattn/go-isatty/isatty_bsd.go | |
parent | 9439b699b8940e2caf84cc29026b0beb70a5a2bb (diff) | |
parent | 310eae4ba44bc1c98c5cc5995f1f183b8ac432b1 (diff) | |
download | podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.tar.gz podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.tar.bz2 podman-3d7a8cf2af43a2d315fff7b8f74ae3d039f68dd0.zip |
Merge pull request #9714 from rhatdan/build
Switch all builds to pull-never
Diffstat (limited to 'vendor/github.com/mattn/go-isatty/isatty_bsd.go')
-rw-r--r-- | vendor/github.com/mattn/go-isatty/isatty_bsd.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go index 42f2514d1..711f28808 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_bsd.go +++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go @@ -3,16 +3,16 @@ package isatty -import ( - "syscall" - "unsafe" -) - -const ioctlReadTermios = syscall.TIOCGETA +import "golang.org/x/sys/unix" // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { - var termios syscall.Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 + _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) + return err == nil +} + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false } |