Writing to Ultrix pty loses data

Ian! D. Allen [CGL] idallen at watcgl.waterloo.edu
Fri Oct 12 20:36:01 AEST 1990


I have an application that writes 600 bytes (several lines) in a chunk
through a master pty out a slave tty into another application (usually
a shell such as csh).  If the slave tty is in cooked mode, everything
works fine.  If the slave tty is put into cbreak or raw mode, the write
loses data.  If the slave tty is cbreak and tandem, the data is lost
silently.  If the slave tty is cbreak but not tandem, it beeps madly as
some buffer is over-run.  Writing the string out in 100-byte chunks
with sleep(2) calls between works, but is painfully slow.

How do I get the pty/tty pair to properly flow control the write so
that nothing gets lost?

The application is a modified version of the program "screen", and the
string it is writing is the $TERMCAP string.  The program works fine if
the program in the current window is a simple shell (cooked mode tty). 
If I start up rlogin, tip, or script (raw or cbreak tty), screen can't
get the whole string out through the pty/tty pair.

This misbehaves on both Ultrix 3.1 (VS3100) and Ultrix 3.1C (DS5400).
It works fine on 4.3 BSD (VAX785, VAX8600, etc.).
-- 
-IAN! (Ian! D. Allen) idallen at watcgl.uwaterloo.ca idallen at watcgl.waterloo.edu
 [129.97.128.64]  Computer Graphics Lab/University of Waterloo/Ontario/Canada



More information about the Comp.unix.ultrix mailing list