
SunOS 5.5 Ioctl Requests termio(7I)
Comparison of the
different cases of
MIN, TIME
interaction
Some points to note about MIN and TIME:
1. In the following explanations,note that the interactions of MIN and TIME are
not symmetric. For example, when MIN > 0 and TIME =0,TIME has no effect.
However, in the opposite case, where MIN = 0 and TIME > 0, both MIN and
TIME play a role in that MIN is satisfied with the receipt of a single character.
2. Also note that in case A (MIN >0,TIME > 0), TIME represents an intercharacter
timer, whereas in case C (MIN =0,TIME > 0), TIME represents a read timer.
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 (for example, file transfer programs),
where a program would like to process at least MIN characters at a time. In case A, the
intercharacter timer is activated by a user as a safety measure; in case B, the timer 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, whereas 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 does a read of 20 bytes, MIN is 10, and 25 char-
acters are present, then 20 characters will be returned to the user.
Writing characters When one or more characters are written, they are transmitted to the terminal as soon as
previously written characters have finishedtyping. Input characters are echoed as they
are typed if echoing has been enabled. If a process produces characters more rapidly
than they can be typed, it will be suspended when its output queue exceeds some limit.
When the queue is drained down to some threshold, the program is resumed.
Special Characters Certain characters have special functions on input. These functions and their default
character values are summarized as follows:
INTR (CTRL-C or ASCII ETX) generates a SIGINT signal. SIGINT is sent to all fre-
quent processes associated with the controlling terminal. Normally,
each such process is forced to terminate, but arrangements may be made
either to ignore the signal or to receive a trap to an agreed upon location.
(See signal(5)).
QUIT (CTRL- or ASCII FS) generates a SIGQUIT signal. Its treatment is identi-
cal to the interrupt signal except that, unless a receiving process has
made other arrangements, it will not only be terminated but a core
image file (called core) will be created in the current working directory.
ERASE (DEL) erases the preceding character. It does not erase beyond the start
of a line, as delimited by a NL, EOF, EOL,orEOL2 character.
WERASE (CTRL-W or ASCII ETX) erases the preceding “word”. It does not erase
beyond the start of a line, as delimited by a NL, EOF, EOL,orEOL2 char-
acter.
KILL (CTRL-U or ASCII NAK) deletes the entire line, as delimited by aNL, EOF,
modified 30 May 1995 7I-349
Kommentare zu diesen Handbüchern