blob: cc4fe6e317769b4bd05e43f820a5d582bf222097 [file] [log] [blame]
khenaidood948f772021-08-11 17:49:24 -04001// +build linux aix
2// +build !js
3
4package logrus
5
6import "golang.org/x/sys/unix"
7
8const ioctlReadTermios = unix.TCGETS
9
10func isTerminal(fd int) bool {
11 _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
12 return err == nil
13}