The c_lflag
field of the structure is used to control various functions:
Mask name | Definition |
| Enable echo function |
| Echo |
| Echo |
| Echo |
| Enable canonical input (line-oriented input with |
| Enable extended functions |
| Enable signals |
| Disable flushing of input or output queues after |
| Send |
| Canonical uppercase and lowercase representation. Will no longer be |
If ECHO
is set, input characters are echoed back to the terminal as soon as they are received. If ECHO
is clear, input characters are not echoed.
If ICANON
and ECHOE
are set, the ERASE
character is echoed as a backspace-spacebackspace sequence, which causes the terminal to clear the last character, if any, from the display. If ECHOE
is set and ECHO
is not set, the ERASE
character is echoed as SP BS
.
If ECHOK
and ICANON
are set, the KILL
character causes the terminal to erase the line from the display or echoes the NL
character after the KILL
character to indicate that the line will be deleted.
If ECHONL
and ICANON
are set, the NL
character is echoed even if ECHO
is not set. This is useful for terminals set to the local echo (so-called half duplex) mode. The EOF
character is echoed only if it is escaped. Since EOT
(End Of Transmission) is used as the default EOF
character, this prevents a connection cleardown from terminals that hang up when EOT
is received.
If ISIG
is set, each input character is checked to determine whether it is one of the special control characters INTR
, QUIT
or SUSP
(job control only). If this is the case, the function associated with that character is performed. If ISIG
is not set, no checking is done. In other words, these special input functions can only be performed if ISIG
is set. They can, however, be disabled individually by changing the value of the control character to an unlikely or impossible value (e.g. 0377).
If ICANON
is set, canonical processing is enabled. This enables the functions to process ERASE
and KILL
characters. The input characters are assembled into lines delimited by NL
, EOF
and EOL
, as described in section “Canonical mode input processing”.
If ICANON
is not set, read requests are satisfied directly from the input queue. This does not take place until at least MIN
bytes have been received or the timeout value TIME
has expired (see section “Non-canonical mode input processing” for more details). The TIME
value is specified in tenths of a second. If NOFLSH
is set, the normal flush of input and output queues that follows reception of INTR
, QUIT
and SUSP
(job control only) characters is not performed.
The initial value for the local modes (value of c_local
) after a call to open()
is that no flag is set.