2019-06-20 07:39:19 +02:00
|
|
|
// +build linux aix
|
2020-08-24 12:13:46 +02:00
|
|
|
// +build !js
|
2019-06-20 07:39:19 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|