Subject: Re: Solaris emulation
To: Stefan Monnier <stefan.monnier@lia.di.epfl.ch>
From: Keith Moore <moore@cs.utk.edu>
List: port-sparc
Date: 02/20/1996 16:32:20
> Well, things haven't improved much.
> The problem with stty is still here. Actually the behavior is really weird
> since sttty settings tend to be changed by the mere fact of running Solaris
> applications.

One problem I've seen with just about every stty/termio/termios emulation
since V7 is that any "foreign" program that does 

gtty(&old);
new=old ; 
...twiddle bits in new...
stty(&new)
...
stty(&old) 

ends up not resetting the previous state of the terminal, because the 
'foreign' emulation stored in 'old' doesn't completely represent the 'native' 
state of the tty. 

I've never actually tried it, but my idea for how to solve this would be
to save the original native tty state the first time someone does a gtty
(or modern-day equivalent) and also save the emulated tty state.
if someone then tries to do an stty of the emulated tty state,
(e.g. stty (&old)), and restore the original native tty state.

--------
Take the pledge! "I do not limit my speech to satisfy the whims of Congress."