Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site metro.oz Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!metro!rossc From: rossc@metro.oz (Ross Cartlidge) Newsgroups: net.bugs.usg Subject: sxt bug Message-ID: <133@metro.oz> Date: Sun, 15-Dec-85 21:01:06 EST Article-I.D.: metro.133 Posted: Sun Dec 15 21:01:06 1985 Date-Received: Tue, 17-Dec-85 07:27:59 EST Reply-To: rossc@metro.oz (Ross Cartlidge) Organization: Uni Computing Centre, Uni of Sydney. Australia. Lines: 25 When using rn(1) on a sxt(7) device you will notice that that characters are often discarded in the prompts. This is because rn(1) uses the ioctl(2) call TCSETAF to throw away type ahead between each question. The sxt driver, however, doesn't support the BUSY bit in t_state. Thus as soon as the output queue to the sxt device empties input and output is flushed (see ttiocom and ttywait in io/tty.c). The flush of the sxt device, however, is translated into a flush of the real device, which may still be transmitting characters, thus these characters are lost. FIX: Simply make the t_state bit BUSY reflect whether output is pending on the associated sxt channel. The following diff(1) applied to io/sxt.c implements this strategy. 747a748 > vtp->t_state |= BUSY; 798a800 > vtp->t_state &= ~BUSY; 873a876 > vtp->t_state &= ~BUSY; 940a944 > vtp->t_state &= ~BUSY;