Xref: utzoo comp.unix.wizards:23685 comp.unix.questions:25058 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: get terminal speed from shell script Message-ID: <3977@auspex.auspex.com> Date: 28 Aug 90 21:01:12 GMT References: <90Aug12.135618edt.18763@me.utoronto.ca> <1990Aug13.005849.23223@jarvis.csri.toronto.edu> <849@hls0.hls.oz> Followup-To: comp.unix.wizards Organization: Auspex Systems, Santa Clara Lines: 30 >By the way, the SUN manuals point out quite clearly that > > "the settings are reported on the standard error." Yes, but they also point out equally clearly that Special Requests speed The terminal speed alone is printed on the stan- dard output. size The terminal (window) sizes are printed on the standard output, first rows and then columns. size and speed always report on the settings of /dev/tty, and always report the settings to the standard output. so "stty speed" and "stty size", in *both* environments, report the speed and size to the standard output. The problem is that the BSD-environment "stty" normally fetches a bunch of mode settings from the standard output when it starts up, and if that fails, it quite reasonably reports this fact. However, the failure is of no consequence if you're just doing "stty speed" or "stty size", since the only data it uses comes from its "ioctl" on "/dev/tty", so it shouldn't worry about the "ioctl"s on the standard output (or shouldn't even do them in the first place!). I think this bug is fixed in 4.1.