[JM:02570] [POST:DP] LDP man-pages fifo.7

アーカイブの一覧に戻る
Akihiro Motoki amoto****@gmail*****
2021年 7月 1日 (木) 01:24:22 JST


 <STATUS>
stat: TR
ppkg: LDP man-pages
page: fifo.7
date: 2021/07/01
mail: amoto****@gmail*****
name: Akihiro Motoki
</STATUS>

fifo.7 の過去のバグ報告を修正した際に、修正した方がよさそうな点が
あったので、投稿します。
添付ファイルは変更を行った po4a ファイルとそこから生成した draft ファイルです。
本文は gendraft.perl で加工したものです。

.\"O .TH FIFO 7 2017-11-26 "Linux" "Linux Programmer's Manual"
.TH FIFO 7 " 2017\-11\-26" Linux "Linux Programmer's Manual"
.\"O ----------------------------------------
.\"O .SH NAME
.\"O fifo \- first-in first-out special file, named pipe
.SH 名前
fifo \- FIFO 特殊ファイル、名前付きパイプ
.\"O ----------------------------------------
.\"O .SH DESCRIPTION
.\"O A FIFO special file (a named pipe) is similar to a pipe,
.\"O except that it is accessed as part of the filesystem.
.\"O It can be opened by multiple processes for reading or
.\"O writing.
.\"O When processes are exchanging data via the FIFO,
.\"O the kernel passes all data internally without writing it
.\"O to the filesystem.
.\"O Thus, the FIFO special file has no
.\"O contents on the filesystem; the filesystem entry merely
.\"O serves as a reference point so that processes can access
.\"O the pipe using a name in the filesystem.
.SH 説明
FIFO 特殊ファイル (名前付きパイプ) はパイプに似ているが、 FIFO
はファイルシステムの一部に関連付けられている点が異なる。複数のプロセスが読み込みや書き込みのために FIFO をオープンすることができる。プロセスが
FIFO を通してデータを交換する場合、カーネルは、データを実際にはファイルシステムに書き込まず、すべてのデータを内部的に渡す。このように、 FIFO
特殊ファイルはファイルシステム上には内容を持たない。ファイルシステムのエントリーは、プロセスがファイルシステム上の名前を使用してそのパイプにアクセスできるように参照ポイントを提供しているだけである。
.\"O ----------------------------------------
.\"O .PP
.\"O The kernel maintains exactly one pipe object for each
.\"O FIFO special file that is opened by at least one process.
.\"O The FIFO must be opened on both ends (reading and writing)
.\"O before data can be passed.
.\"O Normally, opening the FIFO blocks
.\"O until the other end is opened also.
.PP
カーネルは、少なくとも一つのプロセスによってオープンされている FIFO 特殊ファイルに関して、 1 つの FIFO 特殊ファイルにつき 1
つのパイプオブジェクトを管理する。データを渡す前に、 FIFO の両端 (書き込み側と読み出し側) がオープンされていなければならない。通常、 FIFO
をオープンしようとした場合、その反対側がオープンされるまで停止 (block) される。
.\"O ----------------------------------------
.\"O .PP
.\"O A process can open a FIFO in nonblocking mode.
.\"O In this
.\"O case, opening for read-only succeeds even if no one has
.\"O opened on the write side yet and opening for write-only
.\"O fails with
.\"O .B ENXIO
.\"O (no such device or address) unless the other
.\"O end has already been opened.
.PP
プロセスは FIFO を非停止 (nonblocking)
モードでオープンすることもできる。この場合、読み込み専用でオープンしようとした場合には、書き込み側を誰もオープンしていなくても成功する。書き込み専用でオープンしようとした場合には、反対側がすでにオープンされていない限り、
\fBENXIO\fP (そのようなデバイスまたはアドレスは存在しない) というエラーで失敗する。
.\"O ----------------------------------------
.\"O .PP
.\"O Under Linux, opening a FIFO for read and write will succeed
.\"O both in blocking and nonblocking mode.
.\"O POSIX leaves this
.\"O behavior undefined.
.\"O This can be used to open a FIFO for
.\"O writing while there are no readers available.
.\"O A process
.\"O that uses both ends of the connection in order to communicate
.\"O with itself should be very careful to avoid deadlocks.
.PP
Linux では、 FIFO を読み書き両用でオープンした場合、 停止、非停止のどちらのモードでも成功する。 POSIX
では、この場合の動作は定義されていない。この動作は、読み込み側がいない時に書き込み用に FIFO
をオープンするために使用できる。自分自身と通信するために FIFO の両端を使用するプロセスでは、デッドロックを避けるために細心の注意を払う必要がある。
.\"O ----------------------------------------
.\"O .SH NOTES
.\"O For details of the semantics of I/O on FIFOs, see
.\"O .BR pipe (7).
.SH 注意
FIFO における入出力の動作の詳細については、 \fBpipe\fP(7) を参照のこと。
.\"O ----------------------------------------
.\"O .PP
.\"O When a process tries to write to a FIFO that is not opened
.\"O for read on the other side, the process is sent a
.\"O .B SIGPIPE
.\"O signal.
.PP
プロセスが、反対の読み込み側がオープンされていない FIFO に書き込もうとした場合、そのプロセスに \fBSIGPIPE\fP シグナルが送られる。
.\"O ----------------------------------------
.\"O .PP
.\"O FIFO special files can be created by
.\"O .BR mkfifo (3),
.\"O and are indicated by
.\"O .IR "ls\ \-l"
.\"O with the file type \(aqp\(aq.
.PP
FIFO 特殊ファイルは \fBmkfifo\fP(3)  で作成することができ、 \fIls\ \-l\fP ではファイル種別
\(aqp\(aq で表示される。
.\"O ----------------------------------------
.\"O .SH SEE ALSO
.\"O .BR mkfifo (1),
.\"O .BR open (2),
.\"O .BR pipe (2),
.\"O .BR sigaction (2),
.\"O .BR signal (2),
.\"O .BR socketpair (2),
.\"O .BR mkfifo (3),
.\"O .BR pipe (7)
.SH 関連項目
\fBmkfifo\fP(1), \fBopen\fP(2), \fBpipe\fP(2), \fBsigaction\fP(2),
\fBsignal\fP(2),
\fBsocketpair\fP(2), \fBmkfifo\fP(3), \fBpipe\fP(7)
.\"O ----------------------------------------
.\"O .SH COLOPHON
.\"O This page is part of release 5.10 of the Linux
.\"O .I man-pages
.\"O project.
.\"O A description of the project,
.\"O information about reporting bugs,
.\"O and the latest version of this page,
.\"O can be found at
.\"O \%https://www.kernel.org/doc/man\-pages/.
.SH この文書について
この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
\%https://www.kernel.org/doc/man\-pages/ に書かれている。
.\"O ----------------------------------------


linuxjm-discuss メーリングリストの案内
アーカイブの一覧に戻る