HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

t
termio(7) termio(7)
stty command. The NL and CR characters cannot be changed or disabled. The character values for the
remaining special characters can be changed or disabled to suit individual tastes.
If ICANON is set (see Local Modes), the ERASE, KILL, and EOF characters can be escaped by a preceding
\ character, in which case no special function is performed. These characters, and the remaining special
characters, may also be escaped by preceding them with the LNEXT character (see LNEXT above).
If two or more special characters have the same value, the function performed when the character is pro-
cessed is undefined.
Modem Disconnect
If a modem disconnect is detected by the terminal interface for a controlling terminal, and if
CLOCAL is
clear in the
c_cflag field for the terminal (see Control Modes), the
SIGHUP signal is sent to the con-
trolling process of the controlling terminal. Unless other arrangements have been made, this causes the
controlling process to terminate. Any subsequent read from the terminal device returns with an end-of-file
indication until the device is closed. Thus, processes that read a terminal file and test for end-of-file can
terminate appropriately after a disconnect. Any subsequent
write() to the terminal device returns
-1,
with
errno set to [EIO], until the device is closed.
Closing a Terminal Device File
The last process to close a terminal device file causes any output not already sent to the device to be sent to
the device even if output was suspended. This last close always blocks (even if non-blocking I/O has been
specified) until all output has been sent to the terminal device. Any input that has been received but not
read is discarded.
Writing Data and Output Processing
When characters are written, they are placed on the output queue. Characters on the output queue are
transmitted to the terminal as soon as previously-written characters are sent. These characters are pro-
cessed according to the c_oflag field (see Output Modes). Input characters are echoed by putting them
in the output queue as they arrive. If a process produces characters for output more rapidly than they can
be sent, the process is suspended when its output queue exceeds some limit. When the queue has drained
down to some threshold, the process is resumed.
termios Structure
Routines that need to control certain terminal I/O characteristics can do so by using the
termios struc-
ture as defined in the header file
<termios.h> . The structure is defined as follows:
#define NCCS 16
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 modes */
tcflag_t c_reserved; /* reserved for future use */
cc_t c_cc[NCCS]; /* control chars */
};
The special characters are defined by the array c_cc. The relative positions and default values for each
special character function are as follows:
INTR VINTR DEL
QUIT VQUIT Ctrl-|
ERASE VERASE #
KILL VKILL @
EOF VEOF Ctrl-D
EOL VEOL NUL
EOL2 VEOL2 disabled
MIN VMIN NUL
TIME VTIME Ctrl-D
SUSP VSUSP disabled
HP-UX 11i Version 2: December 2007 Update 6 Hewlett-Packard Company 197