[comp.unix.ultrix] reading from a tty with flow control

brw@jim.odr.oz.au (Brian Wallis) (01/22/88)

  A possible bug in the tty driver for Ultrix (V2.0) to do with flow control
using TANDEM and CBREAK. This only occurs when reading from the device using
`read(fd,&buf,1);'.

  I know I know, I should really read more than one character at a time.

  What happens in this case is that the tty driver buffer fills up to the
upper limit and a ^S is sent to the sending device. When a read(fd,&buf,1)
is done, the driver sends a ^Q, even though the buffer is still almost full.
The sending device will start sending again and immediatly get another ^S
but it will succeed in sending 2-4 characters with a net gain of 1-3
characters. When this has happened a few times, the input buffer will
really overflow and characters will be lost.

  Is this really a bug, or have I missed something?
-- 
Brian Wallis (brw@jim.odr.oz) (03) 562-0100 Fax: (03) 562-0616,
	      Telex: Jacobs Radio (Bayswater) 152093         ^

What What What What What! Only 5 whats, that's not very bright!