2
0
mirror of https://github.com/status-im/op-geth.git synced 2025-02-24 20:48:22 +00:00
op-geth/log/term/terminal_solaris.go

10 lines
217 B
Go
Raw Normal View History

package term
import "golang.org/x/sys/unix"
// IsTty returns true if the given file descriptor is a terminal.
func IsTty(fd uintptr) bool {
_, err := unix.IoctlGetTermios(int(fd), unix.TCGETA)
return err == nil
}