How to restore terminal after curses program crashes?

The Grey Wolf greywolf at unisoft.UUCP
Thu Feb 21 10:04:19 AEST 1991


[ Many people write about how to restore terminal settings... ]

I'm expecting a perl script from someone real soon :-).

Me?  Oh, my shell (a superset of {,t}csh) remembers the terminal modes at
the beginning of the session, or whenever one types "setty".  The shell has
code to catch SIGQUIT and restore the terminal modes.  This is most useful
when you haven't been thrown into raw mode -- you can just hit '^\' twice:
once to generate a core, and a second time to reset the terminal.  If you're
in raw mode, either "^Jreset^J" followed by a keyboard QUIT or "^Jrestty^J"
will return the terminal to its last saved state.

The really esoteric ones might want to make a Makefile to deal with it,
or write it in assembler, or ...
-- 
# The days of the computer priesthood are not over.
# May they never be.
# If it sounds selfish, consider how most companies stay in business.



More information about the Comp.unix.programmer mailing list