1
0
mirror of https://github.com/rancher/os.git synced 2025-07-30 22:24:33 +00:00
os/vendor/github.com/Sirupsen/logrus/terminal_solaris.go
Sven Dowideit 4df962d4b6 make ros log to dmesg
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2016-11-30 10:51:30 +10:00

16 lines
273 B
Go

// +build solaris,!appengine
package logrus
import (
"os"
"golang.org/x/sys/unix"
)
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal() bool {
_, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
return err == nil
}