5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-10 19:10:26 +00:00
matterbridge/vendor/github.com/mattn/go-isatty/isatty_solaris.go
2021-10-16 23:23:24 +02:00

22 lines
559 B
Go

// +build solaris
// +build !appengine
package isatty
import (
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c
func IsTerminal(fd uintptr) bool {
_, err := unix.IoctlGetTermio(int(fd), unix.TCGETA)
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
}