How to restore terminal after curses program crashes?

Jean-Pierre Radley jpr at jpradley.jpr.com
Tue Feb 19 14:52:09 AEST 1991


In article <DANJ1.91Feb16002433 at cbnewse.ATT.COM> Dan_Jacobson at ATT.COM writes:
>>>>>> On 16 Feb 91 03:23:19 GMT, jpr at jpradley.jpr.com (Jean-Pierre Radley) said:
>
>J-P> In article <DANJ1.91Feb13170109 at cbnewse.ATT.COM> Dan_Jacobson at ATT.COM writes:
>
>J-P> I do about the same thing, but with somewhat less effort.
>
>J-P> In .profile,
>J-P> 	STTY=`stty-g` export STTY
>
>J-P> In .login,
>J-P> 	setenv STTY `stty-g`
>
>J-P> Then, after a scrambled screen,
>J-P> 	$stty^J
>J-P> restores my prior settings.
>
>Yeah but, you omit any stty-ings you did before you captured them into
>an environment variable---unless you're happy with the differing
>defaults on different machines, e.g., "#"=erase.  Plus, stty -g, and
>certainly stty-g, aren't portable.  Plus I invoke $stty in the
>.profile too.

Well, I thought one might have cleverly inferred, without my explicitly so
stating, that before I set my STTY environment value in my .profile or
.login, that _first_ I do all the specific settings for erase, intr, &c.,
that I desire.

 Jean-Pierre Radley   NYC Public Unix   jpr at jpradley.jpr.com   CIS: 72160,1341



More information about the Comp.unix.programmer mailing list