TERMIOS(M) UNIX System V
Name
termios - POSIX general terminal interface
Description
This page discusses the POSIX termios extensions to the
termio(M) interface. Only those functions not described in
termio(M) are described here.
Certain characters have special functions on input. These
functions and their default character values are summarized
as follows:
SUSP (ASCII NUL) If the ISIG flag is enabled, receipt of
the SUSP character causes A SIGTSTP signal to be
sent to the current process group. The SUSP
character is discarded when processed. It is
normally set to Ctrl-Z.
Several library functions apply to terminal files. The
primary calls use the following structure, defined in the
file <termios.h>:
#define NCCS 13
struct termios {
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local (line discipline) modes */
char c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control chars */
char c_ispeed; /* input baud rate */
char c_ospeed; /* output baud rate */
};
The additional special control characters defined by the
array c_cc. are:
10 VSUSP NUL
11 VSTART DC1
12 VSTOP DC3
The following additional line discipline (0) functions are
available in the c_lflag field:
IEXTEN 0000400 enable extended functions
TOSTOP 0001000 SIGTTOU on background output
If IEXTEN is set, additional non-POSIX functions are
recognized. This is the default. If IEXTEN is not set, the
modes ICANON, ISIG, IXON, and IXOFF are assumed.
If TOSTOP is set, the signal SIGTTOU is sent to the process
group of a process that tries to write to its controlling
terminal if it is not the foreground process group. By
default, this signal stops the members of the process group.
If TOSTOP is not set, the output generated by the process is
output to the current output stream.
The associated library functions are found in tcattr(S) and
tcflow(S).
Files
/dev/tty
/dev/tty*
/dev/console
See Also
ioctl(S), signal(S), stty(C), tcattr(S), tcflow(S),
termio(M), tty(M)
Standards Conformance
termios is conformant with:
IEEE POSIX Std 1003.1-1988 with C Standard Language-
Dependent System Support;
and The X/Open Portability Guide II of January 1987.
(printed 2/15/90) TERMIOS(M)