Xref: utzoo comp.unix.programmer:1070 comp.unix.questions:28663 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1 From: Dan_Jacobson@ATT.COM Newsgroups: comp.unix.programmer,comp.unix.questions Subject: Re: How to restore terminal after curses program crashes? Message-ID: Date: 13 Feb 91 23:01:18 GMT References: <1991Feb13.133332.22320@ousrvr.oulu.fi> <1991Feb13.191442.16443@cs.UAlberta.CA> Sender: danj1@cbnewse.att.com (Dan Jacobson) Reply-To: Dan_Jacobson@ATT.COM Organization: AT&T-BL, Naperville IL, USA Lines: 41 In-Reply-To: pawel@cs.UAlberta.CA's message of 13 Feb 91 19:14:42 GMT > 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 echok echoe ixany hupcl icanon icrnl -ocrnl onlcr -onocr erase ${erase_character-^?} intr ^G kill ^- eof ^D $stty_extra " #$erase_character: can set to ^H for those terminals where more convenient #swtch '^Z' #^Z: datakit, swtch: not in Sun's 5bin/stty #hupcl: then Oliver Lauman's screen(1) won't hang. sure, buddy. export stty; $stty #now have handy $stty variable... if my terminal #gets screwed up I just say $stty at the prompt yup, I just say $ $stty^J and everthing is comfy again. you're welcome. -- Dan_Jacobson@ATT.COM Naperville IL USA +1 708-979-6364