Welcome to mirror list, hosted at ThFree Co, Russian Federation.

terminal_check_unix.go « logrus « sirupsen « github.com « vendor - gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 355dc966f00b341f2ebf01a3b42a9e040df0135d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// +build linux aix

package logrus

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

const ioctlReadTermios = unix.TCGETS

func isTerminal(fd int) bool {
	_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
	return err == nil
}