1 Star 0 Fork 0

hxchjm / erpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
isatty_linux.go 388 Bytes
一键复制 编辑 原始数据 按行查看 历史
andeyalee 提交于 2018-10-21 04:21 . refactor: update logger
// +build linux
// +build !appengine
package color
import (
"syscall"
"unsafe"
)
const ioctlReadTermios = syscall.TCGETS
// IsTerminal return true if the file descriptor is terminal.
func IsTerminal(fd uintptr) bool {
var termios syscall.Termios
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
return err == 0
}
1
https://gitee.com/hxchjm/erpc.git
git@gitee.com:hxchjm/erpc.git
hxchjm
erpc
erpc
18ecc239cc6a

搜索帮助

53164aa7 5694891 3bd8fe86 5694891