[comp.unix.i386] stty won't change the speed

walter@mecky.UUCP (Walter Mecky) (06/27/90)

In article <196@twg.UUCP> bill@.UUCP (Bill Irwin) writes:
+ I  had a similar problem trying to get a serial port to run at  something
+ other  than  9600 for a printer.  The solution was to put  the  following
+ into the rc bootup script:
+ 
+ cat </dev/tty1a > /dev/null &
+ 
+ This,  of  course, moves nothing to nowhere and keeps the port  open.   A
+ subsequent  stty  command would "stick".  I don't know, however, if  this
+ would interfer in any way with your program's use of the port.

No! Don't do it. In most cases, a program will read some characters 
from the port. And must fight with the above "cat"! If you can not
solve the problem locally (there were could suggestions to the originate
question), I think the best central approach will be in an rc script:

	while :; do sleep 30000; done </dev/tty1a &
-- 
Walter Mecky