How to restore terminal after curses program crashes?

Jerry Peek jerry at ora.com
Sat Feb 16 22:52:09 AEST 1991


In article <1991Feb14.192959.22939 at dartvax.dartmouth.edu> andyb at coat.com (Andy Behrens) writes:
> clegg at tolsun.oulu.fi (Matthew Tran Clegg/VTT) writes:
> > I've been working on a program that uses the curses package and
> > cbreak mode.  Once in a while, a bug will cause the program to
> > crash (for example, with a segmentation fault).  
> 
> Typing
> 	ctrl-J reset ctrl-J
> should fix everything.

Once in a while I've had a session wedged bad enough that *each* character
I type is treated as a new command.  After this happened a few times,
I made the following symbolic link in my bin directory:

	ln -s /usr/ucb/reset ]

It makes a single-character command called "]" that does a "reset".
You should be able to use a single-character name for the other fixes
people have posted here, too.

--Jerry Peek, O'Reilly & Associates, Inc.   jerry at ora.com   +1 617 354-5800



More information about the Comp.unix.programmer mailing list