It's sometimes desirable to use to set values for a serial port other than the one your tty may be on (for example, a printer or modem port). But without a program "hanging on to" a port, the settings are pretty much useless in many UNIXes. A tty that is not attached to a process typically gets reset to some default whenever you open it. The only way to set it some way and make it stay that way is to open it and hold on to it, then set the modes.
The standard trick is to use:
sleep 1000000 > /dev/tty
before setting things up. You canthe later, when you are done.
- in net.unix on Usenet, 30 January 1984