mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9fac44028e
full diff: https://github.com/sirupsen/logrus/compare/v1.4.1...v1.4.2 - sirupsen/logrus#946 Fix solaris build - sirupsen/logrus#966 Add a checkTerminal for nacl to support running on play.golang.org - sirupsen/logrus#969 fix build break for plan9 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
11 lines
224 B
Go
11 lines
224 B
Go
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
|
|
}
|