Xref: utzoo comp.unix.programmer:1083 comp.unix.questions:28741 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!fluke!gtisqr!roger From: roger@gtisqr.uucp (Roger Droz) Newsgroups: comp.unix.programmer,comp.unix.questions Subject: Re: How to restore terminal after curses program crashes? Message-ID: <1991Feb15.214221.11464@gtisqr.uucp> Date: 15 Feb 91 21:42:21 GMT References: <1991Feb13.133332.22320@ousrvr.oulu.fi> <1991Feb13.191442.16443@cs.UAlberta.CA> Organization: Global Tech International Inc. Lines: 35 In article Dan_Jacobson@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 [ rest deleted ] How about simply: stty="stty `stty -g`" >yup, I just say >$ $stty^J >and everthing is comfy again. I agree with jik@athena.mit.edu (Jonathan I. Kamens) that one should write the signal handlers early on so that your curses programs die gracefully. ____________ Roger Droz () () Maverick MICRoSystems / Global Technology International (_______) Mukilteo, WA ( ) | | Disclaimer: "We're all mavericks here: | | Each of us has our own opinions, (___) and the company has yet different ones!" Internet: roger@mav.COM UUCP: uw-beaver!gtisqr!roger