Why is stty behaving differantly with Ultrix 3.0 ?

rusty at garnet.berkeley.edu rusty at garnet.berkeley.edu
Wed Mar 29 11:51:21 AEST 1989


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 at violet.berkeley.edu ucbvax!violet!rusty



More information about the Comp.unix.ultrix mailing list