Path: utzoo!attcan!uunet!husc6!mailrus!nrl-cmf!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: Is typeahead loss a generic ksh problem? Message-ID: <7921@brl-smoke.ARPA> Date: 18 May 88 15:07:09 GMT References: <8062@elsie.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <8062@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: >At times ksh will flush typeahead, as shown by the transcript below: >Is this a problem with other versions of ksh? Is there a known fix? It's really a problem with the BSD V7-based terminal handler, which makes it difficult to switch modes without losing typeahead. However, it can be done, as witness the BRL Bourne shell which doesn't have this problem (at least, not when linked with our System V emulation library). We DO have the problem to some degree with our Cray-2, which relies on TELNET protocols to have the "front end" system take care of most aspects of terminal handling instead of doing it right. On the Cray-2 I added a small delay before switching modes to give output time to drain before the OLFCR mapping goes away, but that's not entirely satisfactory either. I suspect the ksh sources could be tweaked for better operation on BSD by borrowing some of the tricks used in my System V ioctl() emulation. Future releases of BSD are supposed to have a POSIX-compatible terminal handler.