OSDN Git Service

(split) LDP: Update draft and release (from the previous commit)
[linuxjm/LDP_man-pages.git] / release / man2 / pipe.2
index 60fa7f2..a190a35 100644 (file)
@@ -66,7 +66,7 @@ pipe, pipe2 \- パイプを生成する
 \fBint pipe2(int \fP\fIpipefd\fP\fB[2], int \fP\fIflags\fP\fB);\fP
 .fi
 .SH 説明
-\fBpipe\fP(2)  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向のデータチャネルである。 配列 \fIpipefd\fP
+\fBpipe\fP()  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向のデータチャネルである。 配列 \fIpipefd\fP
 は、パイプの両端を参照する二つのファイルディスクリプタを 返すのに使用される。 \fIpipefd[0]\fP がパイプの読み出し側、
 \fIpipefd[1]\fP がパイプの書き込み側である。 パイプの書き込み側に書き込まれたデータは、
 パイプの読み出し側から読み出されるまでカーネルでバッファリングされる。 さらなる詳細は \fBpipe\fP(7)  を参照のこと。
@@ -80,25 +80,20 @@ pipe, pipe2 \- パイプを生成する
 .TP 
 \fBO_DIRECT\fP (Linux 3.4 以降)
 .\" commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
-Create a pipe that performs I/O in "packet" mode.  Each \fBwrite\fP(2)  to the
-pipe is dealt with as a separate packet, and \fBread\fP(2)s from the pipe will
-read one packet at a time.  Note the following points:
+「パケット」モードで入出力を行うパイプを作成する。 このパイプへの \fBwrite\fP(2) それぞれが別のパケットとして扱われ、 このパイプからの
+\fBread\fP(2) では一度に一つパケットが読み出される。 以下の点に注意すること。
 .RS
 .IP * 3
-Writes of greater than \fBPIPE_BUF\fP bytes (see \fBpipe\fP(7))  will be split
-into multiple packets.
+\fBPIPE_BUF\fP バイト (\fBpipe\fP(7) 参照) より大きいデータを書き込んだ場合、複数のパケットに分割される。
 .IP *
-If a \fBread\fP(2)  specifies a buffer size that is smaller than the next
-packet, then the requested number of bytes are read, and the excess bytes in
-the packet are discarded.  Specifying a buffer size of \fBPIPE_BUF\fP will be
-sufficient to read the largest possible packets (see the previous point).
+\fBread\fP(2)
+で次のパケットよりも小さなバッファサイズを指定した場合、要求されたバイト数のデータが読み出され、そのパケットの超過分のバイトは破棄される。
+可能性のある最大サイズのパケットを読み出すには、\fBPIPE_BUF\fP のバッファサイズを指定すれば十分である (上の項目を参照)。
 .IP *
-Zero\-length packets are not supported.  (A \fBread\fP(2)  that specifies a
-buffer size of zero is a no\-op, and returns 0.)
+長さ 0 のパケットはサポートされていない。 (バッファサイズ 0 を指定した \fBread\fP(2) は何も行わず 0 を返す)。
 .RE
 .IP
-Older kernels that do not support this flag will indicate this via an
-\fBEINVAL\fP error.
+このフラグをサポートしていない古いカーネルでは、エラー \fBEINVAL\fP が返る。これによりカーネルがサポートしていないことが分かる。
 .TP 
 \fBO_NONBLOCK\fP
 新しく生成される二つのオープンファイル記述 (open file description) の \fBO_NONBLOCK\fP