termio.7 (2010 09)

t
termio(7) termio(7)
VKILL KILL character
VMIN MIN value
VQUIT VQUIT QUIT character
VSTART VSTART START character
VSTOP VSTOP STOP character
VSUSP VSUSP SUSP character
VDSUSP VDSUSP DSUSP character
VTIME TIME value
VLNEXT VLNEXT LNEXT character
termios Structure-Related Functions
The following functions are provided when using the termios structure. Note that the effects on the ter-
minal device of the
cfsetispeed()
and cfsetospeed()
functions do not become effective until the
tcsetattr() function is successfully called. Refer to the appropriate manual entries for details.
termios Structure Functions
Function Description
cfgetospeed() get output baud rate
cfgetispeed() get input baud rate
cfsetospeed() set output baud rate
cfsetispeed() set input baud rate
tcgetattr() get terminal state
tcsetattr() set terminal state
termio Structure-Related OCTL Commands
Several
ioctl() system calls apply to terminal files that use the termio structure (see termio Struc-
ture ). If a requested command is not recognized, the request returns 1 with errno set to [EINVAL].
ioctl() system calls that reference the termio structure have the form:
ioctl (fildes, command, arg)
struct termio *arg;
Commands using this form are:
TCGETA Get the parameters associated with the terminal and store them in the termio
structure referenced by arg. This command is allowed from a background process;
however, the information may be subsequently changed by a foreground process.
TCSETA Set the parameters associated with the terminal from the termio structure refer-
enced by arg. The change is immediate. If characters are being output when the
command is requested, results are undefined and the output may be garbled.
TCSETAW Wait for the output to drain before setting new parameters. This form should be
used when changing parameters that affect output.
TCSETAF Wait for the output to drain, then flush the input queue and set the new parame-
ters.
termio Caveats
Only the first eight special control characters (see termios Structure ) can be set or returned. The values
of indices VEOL and VEOF are the same as indices VTIME and VMIN respectively. Hence if
ICANON is
set, VEOL or VTIME is the additional end-of-line character and VEOF or VMIN is the end-of-file charac-
ter. If ICANON is clear, VEOL or VTIME is the inter-character-timer value and VEOF or VMIN is the
minimum number of characters desired for reads.
Structure-Independent Functions
The following functions which are independent of both the
termio and termios structures are pro-
vided for controlling terminals. Refer to the appropriate manual entries for details.
Structure-Independent Functions
Function Description
tcsendbreak() send a break
HP-UX 11i Version 3: September 2010 13 Hewlett-Packard Company 13