How to restore terminal after curses program crashes?
Jean-Pierre Radley
jpr at jpradley.jpr.com
Sat Feb 16 14:23:19 AEST 1991
In article <DANJ1.91Feb13170109 at cbnewse.ATT.COM> Dan_Jacobson at ATT.COM writes:
>> Once in a while, a bug will cause the program to crash (for example,
>> with a segmentation fault). This completely unhinges the terminal.
>
>Most of the time I find the terminal will respond to "command^J", so I
>my .profile I have:
>
>if test -t
>then
>stty="eval
> stty sane;
> stty
> echo
> echok
> echoe
> ixany
> hupcl
> icanon
> icrnl
> -ocrnl
> onlcr
> -onocr
> erase ${erase_character-^?}
> intr ^G
> kill ^-
> eof ^D
> $stty_extra
>"
>yup, I just say
>$ $stty^J
>and everthing is comfy again.
I do about the same thing, but with somewhat less effort.
In .profile,
STTY=`stty-g` export STTY
In .login,
setenv STTY `stty-g`
Then, after a scrambled screen,
$stty^J
restores my prior settings.
Jean-Pierre Radley NYC Public Unix jpr at jpradley.jpr.com CIS: 72160,1341
More information about the Comp.unix.questions
mailing list