mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #34386 from tklauser/pkg-term-makeraw-fix
pkg/term: set termios VMIN and VTIME in MakeRaw on Linux
This commit is contained in:
commit
6f1907898f
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,8 @@ func MakeRaw(fd uintptr) (*State, error) {
|
||||||
termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN)
|
termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN)
|
||||||
termios.Cflag &^= (unix.CSIZE | unix.PARENB)
|
termios.Cflag &^= (unix.CSIZE | unix.PARENB)
|
||||||
termios.Cflag |= unix.CS8
|
termios.Cflag |= unix.CS8
|
||||||
|
termios.Cc[unix.VMIN] = 1
|
||||||
|
termios.Cc[unix.VTIME] = 0
|
||||||
|
|
||||||
if err := unix.IoctlSetTermios(int(fd), setTermios, termios); err != nil {
|
if err := unix.IoctlSetTermios(int(fd), setTermios, termios); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue