sxt bug

Ross Cartlidge rossc at metro.oz
Mon Dec 16 12:01:06 AEST 1985


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;



More information about the Net.bugs.usg mailing list