Skip to content

Commit

Permalink
Fix solaris build
Browse files Browse the repository at this point in the history
  • Loading branch information
dgsb committed Apr 3, 2019
1 parent 8bdbc7b commit c1b6154
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 c1b6154

Please sign in to comment.