Codebase list golang-github-moby-term / run/e224e7af-18fc-4f5a-834a-afb2939d6a24/main tc.go
run/e224e7af-18fc-4f5a-834a-afb2939d6a24/main

Tree @run/e224e7af-18fc-4f5a-834a-afb2939d6a24/main (Download .tar.gz)

tc.go @run/e224e7af-18fc-4f5a-834a-afb2939d6a24/mainraw · history · blame

//go:build !windows
// +build !windows

package term

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

func tcget(fd uintptr) (*Termios, error) {
	p, err := unix.IoctlGetTermios(int(fd), getTermios)
	if err != nil {
		return nil, err
	}
	return p, nil
}

func tcset(fd uintptr, p *Termios) error {
	return unix.IoctlSetTermios(int(fd), setTermios, p)
}