c49ef1d4bf
fixes issue where terminal_check_notappengine.go can't access terminal package since terminal package is in an internal package
14 lines
216 B
Go
14 lines
216 B
Go
// +build linux aix
|
|
|
|
package terminal
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const ioctlReadTermios = unix.TCGETS
|
|
|
|
func IsTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
|
return err == nil
|
|
}
|
|
|