MCPcopy
hub / github.com/containers/toolbox / GetState

Function GetState

src/pkg/term/term.go:27–32  ·  view source on GitHub ↗
(file *os.File)

Source from the content-addressed store, hash-verified

25type Option func(*unix.Termios)
26
27func GetState(file *os.File) (*unix.Termios, error) {
28 fileFD := file.Fd()
29 fileFDInt := int(fileFD)
30 state, err := unix.IoctlGetTermios(fileFDInt, unix.TCGETS)
31 return state, err
32}
33
34func IsTerminal(file *os.File) bool {
35 if _, err := GetState(file); err != nil {

Callers 5

IsTerminalFunction · 0.85
TestNewStateFromNOPFunction · 0.85
TestSetStateDifferentFunction · 0.85
TestSetStateNOPFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestNewStateFromNOPFunction · 0.68
TestSetStateDifferentFunction · 0.68
TestSetStateNOPFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…