A/UX: TTY Flow Control Settings


Article Change History
----------------------
08/31/92 - REVIEWED
o For technical accuracy.


I tried to change the default settings of /dev/tty0 (and /dev/modem)
to connect an additional printer. Except for setting "modem" to "-modem" and
some other options, the settings did not work for "-hupcl" to "hupcl", "istrip"
to "-istrip", "echo" to "-echo", "echok" to "-echok".

Can you explain?

All tty flow control settings, like "-modem", "dtrflow", "-dtrflow", and so
on, are maintained across last close. This means that the flow control
settings are "remembered" when a tty device is closed and reopened. However,
all other termio characteristics, like speed (50, 75, 1200, and so on), parity
(parenb, parodd, and so on), input modes (ignbrk, brkint, istrip, and so on),
and local modes (echo, echok, and so on), are set to the default settings when
the tty line is closed.

To put the "stty" settings into effect and still keep the tty port open, put a
sleep statement ("sleep 99999", for example) after the "stty" command.

In your case, you can use this:

(stty hupcl -istrip -echo -echok; sleep 99999) < /dev/tty0 &


Published Date: Feb 18, 2012