bug fix
This commit is contained in:
parent
00cc2eaa21
commit
0e91e97132
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
package isatty
|
package isatty
|
||||||
|
|
||||||
|
import "golang.org/x/sys/unix"
|
||||||
|
|
||||||
// IsTerminal return true if the file descriptor is terminal.
|
// IsTerminal return true if the file descriptor is terminal.
|
||||||
func IsTerminal(fd uintptr) bool {
|
func IsTerminal(fd uintptr) bool {
|
||||||
_, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
|
_, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user