losing input when switching from CBREAK to COOKED in SunOS-4

Johan Widen jw at sics.se
Sat Feb 10 14:46:19 AEST 1990


I have a problem with typeahead in my interactions with tcsh on SunOS-4.
The input buffer seems to be flushed when the shell switches from CBREAK
to COOKED. I remember that this was the case in older versions of UNIX
(like v7) and I seem to remember someone mentioning that this "feature"
was put back into SunOS-4 for some reason.

Is this just a problem with my shell and is there a work around?

Here is an example of what I mean:

On a Sun:

> sleep 30
/bin/echo hi
/bin/echo ho
ed Makefile
2
1,5p
> /bin/echo hi
hi

Nothing more happens. (I inserted the ed command just to point out to the
bash freaks out there that the current version of bash does not handle
this very gracefully either).

Now here is what happens on a Sequent Symmetry under DYNIX, and also on a
NeXT (I have to hit return when ed has printed "5819"):

> sleep 30
/bin/echo hi
/bin/echo ho
ed Makefile
2
1,5p
> /bin/echo hi
hi
> /bin/echo ho
ho
> ed Makefile
5819

#       Makefile        4.3     6/11/83
#
#       Makefile        4.3     6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
#

Nothing more happens.

Johan Widen
SICS, PO Box 1263, S-164 28 KISTA, SWEDEN	Internet: jw at sics.se
Tel: +46 8 752 15 32	Ttx: 812 61 54 SICS S	Fax: +46 8 751 72 30



More information about the Comp.sys.sun mailing list