|
Synopsis Platforms
Description Options
Notes Examples
See also |
Synopsis |
/etc/setmode [-w] dev stty-modes
|
Platforms |
Unix
|
Description |
Setmode sets certain terminal I/O options for the
device dev. The main attributes you may want to set include baud rate, parity,
number of stop bits and type of handshaking. Setmode uses the mode attributes of
the command line to call stty(1) and then pauses forever. Unlike stty(1) the
settings made remain active until the system is halted or another process changes the
attributes. This program is especially useful to set attributes that cannot be defined in
the device database css.devices(C).
|
Options |
-w
|
Do not run in background (wait), rather stay attached
to the invoking terminal. Without this option setmode will detach from the
controlling terminal and run quietly in background without using any system resources. The
w-option is especially useful if setmode is invoked through /etc/inittab(4)
with the respawn option set (Unix System V).
|
|
Notes |
Setmode can be stopped by the command kill -15 pid.
|
Examples |
UNIX Version 7 / XENIX 3 This example sets the
terminal I/O options of the device /dev/lp to Xon/Xoff handshaking, 8 data bits and
1 stop bit. The line should be included in the file /etc/rc(4):
/etc/setmode /dev/lp 9600 clocal
-cstopb |
UNIX System V
The same settings can be established on System V by inserting the following line
in /etc/inittab(4):
lp:1:respawn:/etc/setmode -w /dev/lp 9600
ixon ixany cs8 -cstopb -opost |
Important! If you call setmode from within /etc/inittab(4) with the respawn option set, the use of the w-option is mandatory! |
|
See also |
css.devices(C),
init(1), initab(4), stty(1), tty(4)
|
|
|