blob: 355dc966f00b341f2ebf01a3b42a9e040df0135d [file] [log] [blame]
Dinesh Belwalkare63f7f92019-11-22 23:11:16 +00001// +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