summaryrefslogtreecommitdiff
path: root/vendor/github.com/moby/term/tc.go
blob: 65556027a6d379523159da9a02de8b6849357531 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// +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)
}