Dinesh Belwalkar | e63f7f9 | 2019-11-22 23:11:16 +0000 | [diff] [blame] | 1 | // +build linux aix |
2 | |||||
3 | package logrus | ||||
4 | |||||
5 | import "golang.org/x/sys/unix" | ||||
6 | |||||
7 | const ioctlReadTermios = unix.TCGETS | ||||
8 | |||||
9 | func isTerminal(fd int) bool { | ||||
10 | _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) | ||||
11 | return err == nil | ||||
12 | } | ||||
13 |