Gitiles
Code Review
Sign In
gerrit.opencord.org
/
bbsim
/
75ed5b94d4c07e10ff1b5d0f780b0dff55e16aab
/
.
/
vendor
/
github.com
/
sirupsen
/
logrus
/
terminal_check_unix.go
blob: 355dc966f00b341f2ebf01a3b42a9e040df0135d [
file
] [
log
] [
blame
]
// +build linux aix
package logrus
import "golang.org/x/sys/unix"
const ioctlReadTermios = unix.TCGETS
func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}