Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!GIBBS.PHYSICS.PURDUE.EDU!ray From: ray@GIBBS.PHYSICS.PURDUE.EDU (Ray Moody) Newsgroups: gnu.bash.bug Subject: TIOCSETP vs TIOCSETN Message-ID: <8907141849.AA17484@gibbs.physics.purdue.edu> Date: 14 Jul 89 18:49:26 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30 Bash uses TIOCSETP to reset the tty states when a job stops. This flushes my typeahead. Bash should use TIOCSETN to avoid flushing typeahead. Ray ------------------------------------------------------------------------------- RCS file: RCS/jobs.c,v retrieving revision 1.2 diff -c -r1.2 jobs.c *** /tmp/,RCSt1017471 Fri Jul 14 13:47:36 1989 --- jobs.c Fri Jul 14 13:46:31 1989 *************** *** 699,705 int tty = open ("/dev/tty", O_RDONLY); if (tty != -1) { ! ioctl (tty, TIOCSETP, &shell_tty_info); close (tty); } } --- 699,705 ----- int tty = open ("/dev/tty", O_RDONLY); if (tty != -1) { ! ioctl (tty, TIOCSETN, &shell_tty_info); close (tty); } }