aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/mattn/go-isatty/isatty_solaris.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mattn/go-isatty/isatty_solaris.go')
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_solaris.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
index bdd5c79a0..0c3acf2dc 100644
--- a/vendor/github.com/mattn/go-isatty/isatty_solaris.go
+++ b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
@@ -1,5 +1,5 @@
-// +build solaris
-// +build !appengine
+//go:build solaris && !appengine
+// +build solaris,!appengine
package isatty
@@ -8,10 +8,9 @@ import (
)
// IsTerminal returns true if the given file descriptor is a terminal.
-// see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
+// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c
func IsTerminal(fd uintptr) bool {
- var termio unix.Termio
- err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
+ _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA)
return err == nil
}