Index: ng/sys/sysv/ttyio.c =================================================================== RCS file: /home/cvsroot/ng/sys/sysv/ttyio.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.3 diff -c -r1.2.2.1 -r1.2.2.3 *** ttyio.c 2000/12/01 10:04:12 1.2.2.1 --- ttyio.c 2001/01/23 08:50:29 1.2.2.3 *************** *** 1,4 **** ! /* $Id: ttyio.c,v 1.2.2.1 2000/12/01 10:04:12 amura Exp $ */ /* * Name: MicroEMACS * System V terminal I/O. --- 1,4 ---- ! /* $Id: ttyio.c,v 1.2.2.3 2001/01/23 08:50:29 amura Exp $ */ /* * Name: MicroEMACS * System V terminal I/O. *************** *** 19,24 **** --- 19,30 ---- /* * $Log: ttyio.c,v $ + * Revision 1.2.2.3 2001/01/23 08:50:29 amura + * reset terminal polling mode in ttwait() + * + * Revision 1.2.2.2 2001/01/17 18:36:45 amura + * fix typo POSIXTTY to POSIX_TTY + * * Revision 1.2.2.1 2000/12/01 10:04:12 amura * fix ttraw() with termios * unset IEXTEN flag on c_lflag *************** *** 120,126 **** nt.c_cflag |= CS8; /* allow 8th bit on input */ nt.c_cflag &= ~PARENB; /* Don't check parity */ nt.c_lflag &= ~( ECHO | ICANON | ISIG ); ! #ifdef POSIX_TTY nt.c_lflag &= ~IEXTEN; #endif kbdpoll = (((kbdflgs = fcntl(0, F_GETFL, 0)) & O_NDELAY) != 0); --- 126,132 ---- nt.c_cflag |= CS8; /* allow 8th bit on input */ nt.c_cflag &= ~PARENB; /* Don't check parity */ nt.c_lflag &= ~( ECHO | ICANON | ISIG ); ! #ifdef POSIXTTY nt.c_lflag &= ~IEXTEN; #endif kbdpoll = (((kbdflgs = fcntl(0, F_GETFL, 0)) & O_NDELAY) != 0); *************** *** 405,410 **** --- 411,419 ---- #else /* NOT BUGFIX */ signal(SIGALRM, alrm); alarm(2); #endif /* BUGFIX */ + if (kbdpoll && fcntl( 0, F_SETFL, kbdflgs ) < 0) + abort(); + kbdpoll = FALSE; kbdqp = (1 == read(0, &kbdq, 1)); alarm(0); return FALSE; /* successful read if here */