41.6 Using sleep to Keep Port Settings
It's sometimes desirable to use stty (41.3 ) 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:
before setting things up. You can kill (38.10 ) the sleep (40.2 ) later, when you are done.
- in net.unix on Usenet, 30 January 1984