mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 16:36:27 +01:00
14 lines
269 B
Go
14 lines
269 B
Go
//go:build aix || linux || solaris || zos
|
|
// +build aix linux solaris zos
|
|
|
|
package terminal
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const ioctlReadTermios = unix.TCGETS
|
|
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
|
return err == nil
|
|
}
|