]>
Commit | Line | Data |
---|---|---|
15c0b25d AP |
1 | // +build linux |
2 | // +build !appengine | |
3 | ||
4 | package isatty | |
5 | ||
107c1cdb | 6 | import "golang.org/x/sys/unix" |
15c0b25d AP |
7 | |
8 | // IsTerminal return true if the file descriptor is terminal. | |
9 | func IsTerminal(fd uintptr) bool { | |
107c1cdb ND |
10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) |
11 | return err == nil | |
12 | } | |
13 | ||
14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 | |
15 | // terminal. This is also always false on this environment. | |
16 | func IsCygwinTerminal(fd uintptr) bool { | |
17 | return false | |
15c0b25d | 18 | } |