blob: 163c468d5470a0a9254b50d5aaa27457ed70d24d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// +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
}
|