source: code/trunk/vendor/github.com/mattn/go-isatty/isatty_plan9.go@ 822

Last change on this file since 822 was 822, checked in by yakumo.izuru, 22 months ago

Prefer immortal.run over runit and rc.d, use vendored modules
for convenience.

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 509 bytes
Line 
1//go:build plan9
2// +build plan9
3
4package isatty
5
6import (
7 "syscall"
8)
9
10// IsTerminal returns true if the given file descriptor is a terminal.
11func IsTerminal(fd uintptr) bool {
12 path, err := syscall.Fd2path(int(fd))
13 if err != nil {
14 return false
15 }
16 return path == "/dev/cons" || path == "/mnt/term/dev/cons"
17}
18
19// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
20// terminal. This is also always false on this environment.
21func IsCygwinTerminal(fd uintptr) bool {
22 return false
23}
Note: See TracBrowser for help on using the repository browser.