github.com/neatio-net/neatio@v1.7.3-0.20231114194659-f4d7a2226baa/chain/log/term/terminal_solaris.go (about)

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