A/UX: "sleep" and Flow Control Settings


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


A colleage told me that I needed to use the "sleep" command with the "stty"
command when doing modem settings. He said that the purpose of "sleep 3600" is
to force the tty to stay open, so that the later "cu" command can take effect
with changed settings.

However, I was under the impression that flow control settings are maintained
across last close (unlike the standard SVID termio settings) and therefore,
don't need "sleep". Who's right?

You don't have to issue the sleep command to keep the tty open. You are right
as far as you go; the flow control settings are maintained across last close,
unlike the standard SVID termio settings.

All tty flow control characteristics, like "modem", "-modem", "dtrflow",
"-dtrflow", and so on, are maintained across last close. This means the flow
control setting 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), input modes (ignbrk, brkint), and so on, are set
to the default settings when the tty line is closed.

Therefore, a statement like "sleep 3600" in a modem setting is not required,
but for other settings, like the speed change, it is necessary.


Published Date: Feb 18, 2012