Subject: Re: Cryptic behavior...
To: der Mouse <mouse@rodents.montreal.qc.ca>
From: None <seebs@plethora.net>
List: current-users
Date: 03/12/1998 17:33:31
In message <199803122327.SAA27264@Twig.Rodents.Montreal.QC.CA>, der Mouse write
>Well, I note that ksh, trn, and vi are all programs that do the
>equivalent of -echo -icanon themselves (ksh for command-line editing,
>the other two because their user interface demands they do cbreak-style
>input).  Perhaps mail(1) is the only program you regularly use that
>doesn't do cbreak?

Bing!  Duh.  That makes it all so obvious.

Thanks.

Sorry for th clueless question.

>Until I put locktty into my shell I had similar problems: a cbreak or
>raw program would crash on me and leave my tty settings pretty mangled,
>and I wouldn't notice because the shell would run happily.  But then I
>added locktty, and the problem went away.  (What does it do?  When you
>do "set locktty", at the next opportunity the shell does a tcgetattr()
>and saves the result.  Every time it gets the opportunity thereafter,
>it does a tcsetattr() to the saved state (unless and until locktty gets
>unset, of course).

Oh, what a cool program!

>This means that I had to alias stty to "unset
>locktty; /bin/stty \^?:*; set locktty", but that's a small price to pay
>for never having to worry about crashing programs screwing up my tty
>state again.)

Indeed!  Which shell has this?

-s