☰
Debian Codegraph
@
1.9.3-2
1.9.3-1
/
/
terminal_check_bsd.go
☽
☼
terminal_check_bsd.go
code
plain
raw
symbols
SCIP
Expat
2014 Simon Eskildsen
debian/copyright
1
// +build darwin dragonfly freebsd netbsd openbsd
2
// +build !js
3
4
package
logrus
5
6
import
"golang.org/x/sys/unix"
7
8
const
ioctlReadTermios = unix.
TIOCGETA
9
10
func
isTerminal(fd
int
)
bool
{
11
_, err := unix.
IoctlGetTermios
(fd, ioctlReadTermios)
12
return
err ==
nil
13
}