Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Which is more portable: stty < or stty > Message-ID: <3032@auspex.auspex.com> Date: 13 Mar 90 19:22:38 GMT References: <3354@muffin.cme.nist.gov> <12339@smoke.BRL.MIL> Organization: Auspex Systems, Santa Clara Lines: 23 >The former is the 7th Ed. UNIX and 4BSD behavior. >System V assumes you may want to redirect the output somewhere other >than the terminal being probed. You can do that with the V7 and BSD one, it's just more painful - you have to redirect the standard error. The S5 behavior is a bit more natural, in that its output goes to, well, the standard output; the only reason I can see for the V7 behavior is that it makes it possible to set the modes on a tty other than one on which you're logged in without being super-user, since traditionally ttys have been publicly writable but not publicly readable. While in some environments this would be considered a feature ("Hey, Jane, I screwed up my tty settings; could you fix them for me? I'm on '/dev/tty73'."), it would be considered a problem in others ("stty erase 's' kill 't' intr 'y' >/dev/tty73"). Given that in 4.3BSD and now S5R4 ttys are *not* publicly writeable, but writeable only by a special group, to which programs like "write" are set-GID (so that you can't send things like the "transmit screen to host" escape sequence to somebody else's terminal), the V7 behavior doesn't buy you anything any more.