2
0
mirror of https://github.com/elisescu/tty-share synced 2024-11-11 13:10:32 +00:00
tty-share/vendor/github.com/moby/term/tc.go
Vasile Popescu 14266a7f24 Add support for detaching shortcut in client mode
When joining a session from command line, the user can exit now by
pressing a predefined key sequence that can be specified from command
line.
2020-11-04 23:06:34 +01:00

20 lines
321 B
Go

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