How to restore terminal after curses program crashes?

Matthew Tran Clegg/VTT clegg at tolsun.oulu.fi
Thu Feb 14 00:33:32 AEST 1991


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).  This completely
unhinges the terminal.  It won't respond to anything anymore,
except if I press ^C, then the csh prompt will be printed.

(I've noticed sometimes that nethack will crash in this way too, but
only when the game is better than any I've had in months -- a real bummer.)

Does anyone know how to restore the terminal to a sane state?
So far, the only thing that has worked for me is the power switch :-).

Matthew Clegg
clegg at tolsun.oulu.fi, February 13



More information about the Comp.unix.questions mailing list