Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!labrea!agate!rusty From: rusty@garnet.berkeley.edu Newsgroups: comp.unix.ultrix Subject: Re: Why is stty behaving differantly with Ultrix 3.0 ? Message-ID: Date: 29 Mar 89 01:51:21 GMT References: <20471@prls.UUCP> Sender: usenet@agate.BERKELEY.EDU Distribution: usa Lines: 31 In-reply-to: gordon@prls.UUCP's message of 28 Mar 89 20:37:59 GMT The reason the parameters change back to what they were when you do # stty > /dev/tty07 # stty 9600 > /dev/tty07 # stty > /dev/tty07 is because inside the device driver it resets them back to the default values (wired into the device driver) when the device is closed by the last process that has it open. (Or is it that it changes them when you're opening the device if nobody else already has it open?) Since your stty is the only one that had it open, they are reset when it closes the device. The reason they stick when there is a getty/login running on that line is because the getty/login still has the line/device open. I'd be surprised if this is new behavior under 3.0; this has been the way that Unix has done it since the beginning. Thus, if you want to do something at a different speed (or otherwise) you can use parens: # ( stty 9600 ; cat file ) > /dev/tty07 The tty line is kept open during the duration of the whole command line inside the parens, and everything inside the parens has stdout directed to /dev/tty07. -- -------------------------------------- rusty c. wright rusty@violet.berkeley.edu ucbvax!violet!rusty