Use BSD raw mode on darwin. Fixes nano, tmux and others

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
This commit is contained in:
Guillaume J. Charmes 2014-03-13 11:11:02 -07:00
parent f7fe084946
commit 87b153606a
2 changed files with 25 additions and 16 deletions

View file

@ -47,8 +47,6 @@ func MakeRaw(fd uintptr) (*State, error) {
if _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(&oldState.termios))); err != 0 {
return nil, err
}
// C.makeraw()
// return &oldState, nil
newState := oldState.termios
newState.Iflag &^= (IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON)