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

t
termio(7) termio(7)
These two points highlight the dual purpose of the MIN/TIME feature. Cases A and B (where MIN > 0 )
exist to handle burst mode activity (such as file transfer programs) where a program would like to process
at least MIN characters at a time. In case A, the inter-character timer is activated by a user as a safety
measure while in case B it is turned off.
Cases C and D exist to handle single character timed transfers. These cases are readily adaptable to
screen-based applications that need to know if a character is present in the input queue before refreshing
the screen. In case C the read is timed, while in case D it is not.
Another important note is that MIN is always just a minimum. It does not denote a record length. For
example, if a program initiates a read of 20 characters when MIN is 10 and 25 characters are present, 20
characters will be returned to the user. Had the program requested all characters, all 25 characters would
be returned to the user.
Furthermore, if TIME is greater than zero and MIN is greater than
MAX_INPUT
, the read will never ter-
minate as a result of MIN characters being received because all the saved characters are discarded without
notice when
MAX_INPUT is exceeded. If TIME is zero and MIN is greater than
MAX_INPUT, the read
will never terminate unless a signal is received.
Special Characters
Certain characters have special functions on input, output, or both. Unless specifically denied, each special
character can be changed or disabled. To disable a character, set its value to
_POSIX_VDISABLE
(see
unistd(5)). These special functions and their default character values are:
INTR (Rubout or ASCII DEL) special character on input and is recognized if
ISIG (see Local
Modes) is enabled. Generates a
SIGINT signal which is sent to all processes in the
foreground process group for which the terminal is the controlling terminal. Normally,
each such process is forced to terminate, but arrangements can be made to either ignore
or hold the signal, or to receive a trap to an agreed-upon location; see signal(2) and sig-
nal(5). If
ISIG is set, the INTR character is discarded when processed. If ISIG is
clear, the INTR character is processed as a normal data character, and no signal is sent.
QUIT (Ctrl-\ or ASCII FS) special character on input. Recognized if
ISIG (see Local Modes)
is set. The treatment of this character is identical to that of the INTR character except
that a
SIGQUIT signal is generated and the processes that receive this signal are not
only terminated, but a core image file (called core) is created in the current working
directory if the implementation supports core files.
SWTCH (ASCII NUL) special character on input and is only used by the shell layers facility
shl(1). The shell layers facility is not part of the general terminal interface. No special
functions are performed by the general terminal interface when SWTCH characters are
encountered.
ERASE (
#) special character on input and is recognized if ICANON (see Local Modes)is
enabled. Erases the preceding character. Does not erase beyond the start of a line, as
delimited by a NL, EOF, EOL, or EOL2 character. If
ICANON is enabled, the ERASE
character is discarded when processed. If ICANON is not enabled, the ERASE charac-
ter is treated as a normal data character.
WERASE (disabled) special character on input and is recognized if ICANON (see Local Modes)is
enabled. Erases the preceding word. Does not erase beyond the start of a line, as del-
imited by a NL, EOF, EOL, or EOL2 character. If ICANON is enabled, the WERASE
character is discarded when processed. If ICANON is not enabled, the WERASE char-
acter is treated as a normal data character.
KILL (@) special character on input and is recognized if ICANON is enabled. KILL deletes
the entire line, as delimited by a NL, EOF, EOL, or EOL2 character. If ICANON is
enabled, the KILL character is discarded when processed. If ICANON is not enabled,
the KILL character is treated as a normal data character.
EOF (Ctrl-D or ASCII EOT) special character on input and is recognized if ICANON is
enabled. EOF can be used to generate an end-of-file from a terminal. When received,
all the characters waiting to be read are immediately passed to the program without
waiting for a new-line, and the EOF is discarded. Thus, if there are no characters wait-
ing, (that is, the EOF occurred at the beginning of a line) a character count of zero is
returned from read(), representing an end-of-file indication. If ICANON is enabled,
the EOF character is discarded when processed. If ICANON is not enabled, the EOF
HP-UX 11i Version 2: December 2007 Update 4 Hewlett-Packard Company 195