source: code/trunk/vendor/github.com/mattn/go-isatty/isatty_solaris.go@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 582 bytes
Line 
1//go:build solaris && !appengine
2// +build solaris,!appengine
3
4package isatty
5
6import (
7 "golang.org/x/sys/unix"
8)
9
10// IsTerminal returns true if the given file descriptor is a terminal.
11// see: https://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/port/gen/isatty.c
12func IsTerminal(fd uintptr) bool {
13 _, err := unix.IoctlGetTermio(int(fd), unix.TCGETA)
14 return err == nil
15}
16
17// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
18// terminal. This is also always false on this environment.
19func IsCygwinTerminal(fd uintptr) bool {
20 return false
21}
Note: See TracBrowser for help on using the repository browser.