Skip to content

Commit

Permalink
Merge pull request sirupsen#946 from sirupsen/solaris_build
Browse files Browse the repository at this point in the history
Fix solaris build
  • Loading branch information
dgsb committed Apr 3, 2019
2 parents 6e3c466 + 2f33de8 commit 34b3e79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terminal_check_solaris.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package logrus

import (
"golang.org/x/sys/unix"
)

// IsTerminal returns true if the given file descriptor is a terminal.
func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
return err == nil
}

0 comments on commit 34b3e79

Please sign in to comment.