[comp.bugs.4bsd] script problem

wls@csd4.csd.uwm.edu (Bill Stapleton) (12/20/89)

[I posted this to comp.unix.wizards and got no response, so...]

I've been looking into a problem we have with the script program garbaging 
output to the terminal.  I haven't found a newer version, fix, or mention of
this problem, so here goes.  This is with BSD 4.3-tahoe and script 5.6:

The problem seems to stem from script running in RAW mode, expecting everything
else to take care of the flow-control.  Unfortunately, the response to XOFF is
then too slow, and a slow terminal is over-run, producing various unusable
displays.  I note that other programs, notably rlogin, use the TIOCPKT feature
of the pty to figure out when RAW mode is neccesary, running CBREAK (with its
own local flow-control) otherwise.  Is there a reason that script doesn't do
this?  (appologies if I've condensed this down past making any sense)

Does anybody else consider this a real problem?  Has anyone fixed it?
(This problem may be reproduced using a "slow" terminal which requires flow-
control to "keep up", running script, then running something that produces
lots of output quickly (ls, etc);  Alternately, simply notice how slow the
response to XOFF is while running through script)

--
Bill Stapleton
     wls@csd4.csd.uwm.edu
     uwmcsd4!wls

casey@gauss.llnl.gov (Casey Leedom) (12/20/89)

| From: wls@csd4.csd.uwm.edu (Bill Stapleton)
| 
| I note that other programs, notably rlogin, use the TIOCPKT feature of
| the pty to figure out when RAW mode is necessary, running CBREAK (with its
| own local flow-control) otherwise.  Is there a reason that script doesn't
| do this?  (apologies if I've condensed this down past making any sense)

  I think you're just running into the fact that script isn't used that
often and rlogin, etc. are.  It took extra code to do the TIOCPKT
processing you describe and it just never became that important an
issue.  I'm sure that, if you were to write, test and submit it, Berkeley
would accept simple patch implementing the same kind of line control
facilities found in rlogin.  Unfortunately Berkeley is far too busy with
other things with higher priorities to have any time left over for this.
I mean, which would you rather have: a new virtual memory, NFS, etc. or
this small problem in script fixed? :-)

Casey

decot@hpisod2.HP.COM (Dave Decot) (12/23/89)

> I mean, which would you rather have: a new virtual memory, NFS, etc. or
> this small problem in script fixed? :-)

I would rather have almost anything other than NFS.

Dave