]>
Commit | Line | Data |
---|---|---|
9b12e4fe JC |
1 | // +build solaris |
2 | ||
3 | package logrus | |
4 | ||
5 | import ( | |
6 | "os" | |
7 | ||
8 | "github.com/fsouza/go-dockerclient/external/golang.org/x/sys/unix" | |
9 | ) | |
10 | ||
11 | // IsTerminal returns true if the given file descriptor is a terminal. | |
12 | func IsTerminal() bool { | |
13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA) | |
14 | return err == nil | |
15 | } |