rclone/vendor/github.com/sirupsen/logrus/terminal_check_unix.go
2020-06-29 14:44:57 +01:00

13 lines
227 B
Go

// +build linux aix
// +build !js
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
}