.\" Enhanced the discussion of "raw" mode for cfmakeraw().
.\" Document CMSPAR.
.\"
-.TH TERMIOS 3 2010-06-20 "Linux" "Linux Programmer's Manual"
+.TH TERMIOS 3 2011-09-08 "Linux" "Linux Programmer's Manual"
.SH NAME
termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
-cc_t c_cc[NCCS]; /* control chars */
+cc_t c_cc[NCCS]; /* special characters */
.fi
.in
.PP
If \fBICANON\fP is also set, echo the NL character even if ECHO is not set.
.TP
.B ECHOCTL
-(not in POSIX) If \fBECHO\fP is also set, ASCII control signals other than
+(not in POSIX) If \fBECHO\fP is also set,
+terminal special characters other than
TAB, NL, START, and STOP are echoed as \fB^X\fP,
where X is the character with
-ASCII code 0x40 greater than the control signal.
+ASCII code 0x40 greater than the special character.
For example, character
0x08 (BS) is echoed as \fB^H\fP.
[requires
special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted,
and for the \fBIUCLC\fP flag to be effective.
.PP
-The \fIc_cc\fP array defines the special control characters.
+The \fIc_cc\fP array defines the terminal special characters.
The symbolic indices (initial values) and meaning are:
.TP
-.B VINTR
-(003, ETX, Ctrl-C, or also 0177, DEL, rubout)
-Interrupt character.
-Send a
-.B SIGINT
-signal.
+.B VDISCARD
+(not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
+Toggle: start/stop discarding pending output.
Recognized when
-.B ISIG
+.B IEXTEN
is set, and then not passed as input.
.TP
-.B VQUIT
-(034, FS, Ctrl-\e)
-Quit character.
-Send
-.B SIGQUIT
-signal.
+.B VDSUSP
+(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
+Delayed suspend character (DSUSP):
+send
+.B SIGTSTP
+signal when the character is read by the user program.
Recognized when
+.B IEXTEN
+and
.B ISIG
+are set, and the system supports
+job control, and then not passed as input.
+.TP
+.B VEOF
+(004, EOT, Ctrl-D)
+End-of-file character (EOF).
+More precisely: this character causes the pending tty buffer to be sent
+to the waiting user program without waiting for end-of-line.
+If it is the first character of the line, the
+.BR read (2)
+in the user program returns 0, which signifies end-of-file.
+Recognized when
+.B ICANON
is set, and then not passed as input.
.TP
+.B VEOL
+(0, NUL)
+Additional end-of-line character (EOL).
+Recognized when
+.B ICANON
+is set.
+.TP
+.B VEOL2
+(not in POSIX; 0, NUL)
+Yet another end-of-line character (EOL2).
+Recognized when
+.B ICANON
+is set.
+.TP
.B VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #)
-Erase character.
+Erase character (ERASE).
This erases the previous not-yet-erased character,
but does not erase past EOF or beginning-of-line.
Recognized when
.B ICANON
is set, and then not passed as input.
.TP
+.B VINTR
+(003, ETX, Ctrl-C, or also 0177, DEL, rubout)
+Interrupt character (INTR).
+Send a
+.B SIGINT
+signal.
+Recognized when
+.B ISIG
+is set, and then not passed as input.
+.TP
.B VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @)
-Kill character.
+Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when
.B ICANON
is set, and then not passed as input.
.TP
-.B VEOF
-(004, EOT, Ctrl-D)
-End-of-file character.
-More precisely: this character causes the pending tty buffer to be sent
-to the waiting user program without waiting for end-of-line.
-If it is the first character of the line, the
-.BR read (2)
-in the user program returns 0, which signifies end-of-file.
+.B VLNEXT
+(not in POSIX; 026, SYN, Ctrl-V)
+Literal next (LNEXT).
+Quotes the next input character, depriving it of
+a possible special meaning.
Recognized when
-.B ICANON
+.B IEXTEN
is set, and then not passed as input.
.TP
.B VMIN
-Minimum number of characters for noncanonical read.
+Minimum number of characters for noncanonical read (MIN).
.TP
-.B VEOL
-(0, NUL)
-Additional end-of-line character.
+.B VQUIT
+(034, FS, Ctrl-\e)
+Quit character (QUIT).
+Send
+.B SIGQUIT
+signal.
Recognized when
-.B ICANON
-is set.
-.TP
-.B VTIME
-Timeout in deciseconds for noncanonical read.
+.B ISIG
+is set, and then not passed as input.
.TP
-.B VEOL2
-(not in POSIX; 0, NUL)
-Yet another end-of-line character.
+.B VREPRINT
+(not in POSIX; 022, DC2, Ctrl-R)
+Reprint unread characters (REPRINT).
Recognized when
.B ICANON
-is set.
-.TP
-.B VSWTCH
-(not in POSIX; not supported under Linux; 0, NUL)
-Switch character.
-(Used by \fBshl\fP only.)
+and
+.B IEXTEN
+are set, and then not passed as input.
.TP
.B VSTART
(021, DC1, Ctrl-Q)
-Start character.
+Start character (START).
Restarts output stopped by the Stop character.
Recognized when
.B IXON
is set, and then not passed as input.
.TP
+.B VSTATUS
+(not in POSIX; not supported under Linux;
+status request: 024, DC4, Ctrl-T).
+Status character (STATUS).
+Display status information at terminal,
+including state of foreground process and amount of CPU time it has consumed.
+Also sends a
+.BR SIGINFO
+signal (not supported on Linux) to the foreground process group.
+.TP
.B VSTOP
(023, DC3, Ctrl-S)
-Stop character.
+Stop character (STOP).
Stop output until Start character typed.
Recognized when
.B IXON
.TP
.B VSUSP
(032, SUB, Ctrl-Z)
-Suspend character.
+Suspend character (SUSP).
Send
.B SIGTSTP
signal.
.B ISIG
is set, and then not passed as input.
.TP
-.B VDSUSP
-(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
-Delayed suspend character:
-send
-.B SIGTSTP
-signal when the character is read by the user program.
-Recognized when
-.B IEXTEN
-and
-.B ISIG
-are set, and the system supports
-job control, and then not passed as input.
+.B VSWTCH
+(not in POSIX; not supported under Linux; 0, NUL)
+Switch character (SWTCH).
+Used in System V to switch shells in
+.IR "shell layers" ,
+a precedessor to shell job control.
.TP
-.B VLNEXT
-(not in POSIX; 026, SYN, Ctrl-V)
-Literal next.
-Quotes the next input character, depriving it of
-a possible special meaning.
-Recognized when
-.B IEXTEN
-is set, and then not passed as input.
+.B VTIME
+Timeout in deciseconds for noncanonical read (TIME).
.TP
.B VWERASE
(not in POSIX; 027, ETB, Ctrl-W)
-Word erase.
-Recognized when
-.B ICANON
-and
-.B IEXTEN
-are set, and then not passed as input.
-.TP
-.B VREPRINT
-(not in POSIX; 022, DC2, Ctrl-R)
-Reprint unread characters.
+Word erase (WERASE).
Recognized when
.B ICANON
and
.B IEXTEN
are set, and then not passed as input.
-.TP
-.B VDISCARD
-(not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
-Toggle: start/stop discarding pending output.
-Recognized when
-.B IEXTEN
-is set, and then not passed as input.
-.TP
-.B VSTATUS
-(not in POSIX; not supported under Linux;
-status request: 024, DC4, Ctrl-T).
.LP
-These symbolic subscript values are all different, except that
+An individual terminal special character can be disabled by setting
+the value of the corresponding
+.I c_cc
+element to
+.BR _POSIX_VDISABLE .
+.LP
+The above symbolic subscript values are all different, except that
.BR VTIME ,
.B VMIN
may have the same value as