Xref: utzoo comp.unix.programmer:1137 comp.unix.questions:28868 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!unisoft!greywolf From: greywolf@unisoft.UUCP (The Grey Wolf) Newsgroups: comp.unix.programmer,comp.unix.questions Subject: Re: How to restore terminal after curses program crashes? Message-ID: <3388@unisoft.UUCP> Date: 20 Feb 91 23:04:19 GMT References: <1991Feb13.133332.22320@ousrvr.oulu.fi> <1991Feb13.191442.16443@cs.UAlberta.CA> <1991Feb16.032319.2676@jpradley.jpr.com> Reply-To: greywolf@unisoft.UUCP (The Grey Wolf) Organization: Foo Bar and Grill Lines: 18 [ 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.