blob: 355dc966f00b341f2ebf01a3b42a9e040df0135d [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001// +build linux aix
2
3package logrus
4
5import "golang.org/x/sys/unix"
6
7const ioctlReadTermios = unix.TCGETS
8
9func isTerminal(fd int) bool {
10 _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
11 return err == nil
12}
13