source: code/trunk/vendor/github.com/sirupsen/logrus/terminal_check_unix.go@ 70

Last change on this file since 70 was 67, checked in by Izuru Yakumo, 23 months ago

Use vendored modules

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 231 bytes
Line 
1// +build linux aix zos
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}
Note: See TracBrowser for help on using the repository browser.