how to stty another terminal?

Guy Harris guy at auspex.auspex.com
Sat Dec 15 12:08:56 AEST 1990


>Yes. Either stty onlcr < /dev/ttyd4, stty onclr > /dev/ttyd4 
>
>( I'm not sure which one. )

Given that he didn't say what flavor of UNIX he was running, nobody else
is sure, either; V7 and BSD-flavored versions of "stty" use the latter
(they act on the standard output), and S5-flavored versions use the
former (they act on the standard input).

Note that the flavor here has nothing to do with whether the tty
driver's "ioctl()" interface is V7/BSD-flavored or S5-flavored; SunOS
4.x's tty driver's fundamental interface is an S5 superset (although
there's a streams module to translate V7/BSD "ioctl()"s into S5-superset
"ioctl()"s), but it has a V7/BSD-flavored "stty" in "/usr/bin" and an
S5-flavored one in "/usr/5bin".

While "onlcr" is an S5-flavored mode, he could be running SunOS 4.x and
the BSD-flavored "stty" in "/usr/bin".

>Or just open /dev/ttyd4, load in the struct sgttyb (or termio for SunOS),

More correctly, "termio" or "termios" for systems with more modern tty
drivers, including System V ("termio" prior to R4, either one for R4),
SunOS 4.x (either one), or 4.4BSD ("termios"), and "sgttyb" for systems
with older tty drivers, including BSD prior to 4.4, SunOS prior to 4.0,
etc..  (Some systems, such as SunOS 4.x and S5R4, support both.)



More information about the Comp.unix.questions mailing list