Codebase list golang-github-moby-term / 00d05b0d-8f70-40fe-8bd6-edf3b494f61a/main tc.go
00d05b0d-8f70-40fe-8bd6-edf3b494f61a/main

Tree @00d05b0d-8f70-40fe-8bd6-edf3b494f61a/main (Download .tar.gz)

tc.go @00d05b0d-8f70-40fe-8bd6-edf3b494f61a/mainraw · history · blame

// +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)
}