X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=draft%2Fman3%2Ftermios.3;fp=draft%2Fman3%2Ftermios.3;h=4a7b539b76eeccb19f1c0bc771b0ff55eb19a382;hb=406b1bf2d38c3c2e0536775b4446a669cfa222c3;hp=5e16c5a73c6f00771eecac28af4c261cd3f72e03;hpb=37013ea09923fad326cd02f60fd4305db674bd77;p=linuxjm%2FLDP_man-pages.git diff --git a/draft/man3/termios.3 b/draft/man3/termios.3 index 5e16c5a7..4a7b539b 100644 --- a/draft/man3/termios.3 +++ b/draft/man3/termios.3 @@ -484,37 +484,30 @@ LNEXT も効果を持つ)。 \fBread\fP(2) は最大でも 1行の入力しか が完了する条件が決定される。4種類の場合がある: .TP MIN == 0, TIME == 0 (polling read) -If data is available, \fBread\fP(2) returns immediately, with the lesser of -the number of bytes available, or the number of bytes requested. If no data -is available, \fBread\fP(2) returns 0. +データが利用可能であれば、 \fBread\fP(2) はすぐに返る。このときの返り値は、そのとき利用可能なバイト数か \fBread\fP(2) +の要求バイト数のうち小さい方となる。 利用可能なデータがない場合 \fBread\fP(2) は 0 を返す。 .TP MIN > 0, TIME == 0 (blocking read) -\fBread\fP(2) blocks until MIN bytes are available, and returns up to the -number of bytes requested. +\fBread\fP(2) は、利用可能なデータが MIN バイトに達するまで停止する。返り値は最大でも要求バイト数である。 .TP MIN == 0, TIME > 0 (read with timeout) -TIME specifies the limit for a timer in tenths of a second. The timer is -started when \fBread\fP(2) is called. \fBread\fP(2) returns either when at -least one byte of data is available, or when the timer expires. If the -timer expires without any input becoming available, \fBread\fP(2) returns 0. -If data is already available at the time of the call to \fBread\fP(), the call -behaves as though the data was received immediately after the call. +TIME はタイマの上限を規定し、単位は 1/10 秒である。 タイマは \fBread\fP(2) が呼ばれた時点で開始される。 \fBread\fP(2) +が返るのは、少なくとも 1バイトのデータが利用可能となった時点、 またはタイマが時間切れとなった時点である。 +入力が全くなくタイマが時間切れとなった場合、 \fBread\fP(2) は 0 を返す。 \fBread\fP() +の呼び出し時にすでに利用可能なデータがある場合、 その呼び出しは呼び出し直後にそのデータが到着したかのように振る舞う。 .TP MIN > 0, TIME > 0 (read with interbyte timeout) -TIME specifies the limit for a timer in tenths of a second. Once an initial -byte of input becomes available, the timer is restarted after each further -byte is received. \fBread\fP(2) returns when any of the following conditions -is met: +TIME はタイマの上限を規定し、単位は 1/10 秒である。 入力の最初のバイトが利用可能になった後は、 新たに +1バイト受信する度にタイマがリセットされる。 \fBread\fP(2) は以下の条件のいずれかを満たした場合に返る。 .RS .IP * 3 -MIN bytes have been received. +MIN バイトのデータを受信した。 .IP * -The interbyte timer expires. +バイト間タイマーが時間切れになった。 .IP * .\" e.g., Solaris -The number of bytes requested by \fBread\fP(2) has been received. (POSIX does -not specify this termination condition, and on some other implementations -\fBread\fP() does not return in this case.) +\fBread\fP(2) で要求されたバイト数のデータを受信した (POSIX ではこの終了条件は規定されておらず、 他のいくつかの実装では +\fBread\fP() はこの条件では返らない)。 .RE .IP Because the timer is started only after the initial byte becomes available,