
termio(7I) Ioctl Requests SunOS 5.5
The ERASE andKILL characters may be entered literally by preceding them with the
escape character (\). In this case, the escape character is not read. The erase and kill
characters may be changed.
Non-canonical mode
input processing
In non-canonical mode input processing, input characters are not assembled into lines,
and erase and kill processing does not occur. The MIN and TIME values are used to
determine how to process the characters received.
MIN represents the minimum number of characters that should be received when the
read is satisfied (that is, when the characters are returned to the user). TIME is a timer of
0.10-second granularity that is used to timeout bursty and short-term data transmissions.
The four possible values for MIN and TIME and their interactions are described below.
Case A: MIN >0,TIME >0
In this case, TIME serves as an intercharacter timer and is activated after the first
character is received. Since it is an intercharacter timer, it is reset after a character
is received. The interaction between MIN and TIME is as follows: as soon as one
character is received, the intercharacter timer is started. If MIN characters are
received before the intercharacter timer expires (note that the timer is reset upon
receipt of each character), the read is satisfied. If the timer expires before MIN
characters are received, the characters received to that point are returned to the
user. Note that if TIME expires, at least one character will be returned because
the timer would not have beenenabled unless a character was received. In this
case (MIN >0,TIME > 0), the read sleeps until the MIN and TIME mechanisms
are activated by the receipt of the first character. If the number of characters read
is less than the number of characters available, the timer is not reactivated and
the subsequent read is satisfied immediately.
Case B: MIN >0,TIME =0
In this case, since the value of TIME is zero, the timer plays no role and only
MIN is significant. A pending read is not satisfied untilMIN characters are
received (the pendingread sleeps until MIN characters are received). A program
that uses this case to read record based terminalI/O may block indefinitely in the
read operation.
Case C: MIN =0,TIME >0
In this case, since MIN =0,TIME no longer represents an intercharacter timer: it
now serves as a read timer that is activated as soon as a read is done. A read is
satisfied as soon as a single character is received or the read timer expires. Note
that, in this case, if the timer expires, no character is returned. If the timer does
not expire, the only way the read can be satisfied is if a character is received. In
this case, the read will not block indefinitely waiting for a character; if no charac-
ter is received within TIME∗.10 seconds after the read is initiated, the read
returns with zero characters.
Case D: MIN =0,TIME =0
In this case, return is immediate. The minimum of either the number of charac-
ters requested or the number of characters currently available is returned
without waiting for more characters to be input.
7I-348 modified 30 May 1995
Comentários a estes Manuais