Skip to content

Commit 9b3cdde

Browse files
authored
Merge pull request #946 from sirupsen/solaris_build
Fix solaris build
2 parents 8bdbc7b + c1b6154 commit 9b3cdde

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

terminal_check_solaris.go

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package logrus
2+
3+
import (
4+
"golang.org/x/sys/unix"
5+
)
6+
7+
// IsTerminal returns true if the given file descriptor is a terminal.
8+
func isTerminal(fd int) bool {
9+
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
10+
return err == nil
11+
}

0 commit comments

Comments
 (0)