]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/mattn/go-isatty/isatty_solaris.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / mattn / go-isatty / isatty_solaris.go
1 // +build solaris
2 // +build !appengine
3
4 package isatty
5
6 import (
7 "golang.org/x/sys/unix"
8 )
9
10 // IsTerminal returns true if the given file descriptor is a terminal.
11 // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
12 func IsTerminal(fd uintptr) bool {
13 var termio unix.Termio
14 err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
15 return err == nil
16 }
17
18 // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
19 // terminal. This is also always false on this environment.
20 func IsCygwinTerminal(fd uintptr) bool {
21 return false
22 }