Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!quagga!undeed!barrett From: barrett@Daisy.EE.UND.AC.ZA (Alan P Barrett) Newsgroups: comp.unix.questions Subject: Re: stty -g output mapping to stty -a output Message-ID: <1991Jun11.145110.12224@Daisy.EE.UND.AC.ZA> Date: 11 Jun 91 14:51:10 GMT References: <27123@adm.brl.mil> <14013@dog.ee.lbl.gov> Organization: Univ. Natal, Durban, S. Africa Lines: 26 In article <14013@dog.ee.lbl.gov>, torek@elf.ee.lbl.gov (Chris Torek) writes: > The output from `stty -g' is entirely private to the implementation, > and may change from moment to moment. The only constraint on it is that > a later stty with that output should restore the terminal modes (i.e., > it has to contain enough information, in some arbitrary format, to do > this). Ah, but how much later? Is the output of one stty -g allowed to be kept somewhere and fed to another stty later, after the implementation has changed? How often is the implementation allowed to change? I can do a {mv my-new-and-improved-stty /bin/stty} any time, and thereby change the implementation of stty instantaneously. Now what happens to the remembered output of the old stty -g? Is it still expected to work? If so then surely there _should_ be a standard format (or at least a standard lowest common denominator). If the format is not expected to work from one implementation to another, then how can an application rely on being able to do {flags=`stty -g`; blah blah blah; stty $flags}? It seems that we cannot rely even on {stty `stty -g`} because the implementation of stty could change during the execution of the command. --apb Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa RFC822: barrett@ee.und.ac.za Bang: m2xenix!quagga!undeed!barrett