1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" changed section from 2 to 3, aeb, 950919
27 .\" Japanese Version Copyright (c) 1998 George Momma
28 .\" all rights reserved.
29 .\" Translated Mon May 25 23:11:03 JST 1998
30 .\" by George Momma <momma@wakhok.ac.jp>
31 .\" Updated 1999-12-11 by Kentaro Shirakata <argrath@ub32.org>
32 .\" Updated 2008-07-30 by Kentaro Shirakata <argrath@ub32.org>
34 .\"WORD: named pipe 名前付きパイプ
35 .\"WORD: permission 許可モード
36 .\"WORD: filename ファイル名
37 .\"WORD: filename component ファイル名部分
38 .\"WORD: directory component ディレクトリ部分
39 .TH MKFIFO 3 2008-06-12 "GNU" "Linux Programmer's Manual"
42 .\"O mkfifo \- make a FIFO special file (a named pipe)
43 mkfifo \- FIFOスペシャルファイル(名前付きパイプ)を作成する
47 .B #include <sys/types.h>
48 .B #include <sys/stat.h>
50 .BI "int mkfifo(const char *" pathname ", mode_t " mode );
55 .\"O makes a FIFO special file with name \fIpathname\fP.
56 .\"O \fImode\fP specifies the FIFO's permissions.
57 .\"O It is modified by the
58 .\"O process's \fBumask\fP in the usual way: the permissions of the created
59 .\"O file are \fB(\fP\fImode\fP\fB & ~umask)\fP.
61 は名前 \fIpathname\fP を持つFIFOスペシャルファイルを作成
62 する。FIFOの許可モードは \fImode\fP で指定され、プロセスの
63 \fBumask\fP によって通常の方式で変更を受ける: 作成されたファイルの許可
64 モードは \fB(\fP\fImode\fP\fB & ~umask)\fP となる。
66 .\"O A FIFO special file is similar to a pipe, except that it is created
67 .\"O in a different way.
68 .\"O Instead of being an anonymous communications
69 .\"O channel, a FIFO special file is entered into the file system by
72 FIFOスペシャルファイルはパイプに似ているが、作成のされ方のみが異なって
73 いる。FIFOスペシャルファイルは名前のない通信路ではなく、
75 の呼び出しによりファイルシステムの中に加えられる。
77 .\"O Once you have created a FIFO special file in this way, any process can
78 .\"O open it for reading or writing, in the same way as an ordinary file.
79 .\"O However, it has to be open at both ends simultaneously before you can
80 .\"O proceed to do any input or output operations on it.
81 .\"O Opening a FIFO for reading normally blocks until some
82 .\"O other process opens the same FIFO for writing, and vice versa.
85 .\"O for nonblocking handling of FIFO special files.
86 ひとたびこのようにしてFIFOスペシャルファイルが作成されると、通常のファ
87 イルと同じように、どのプロセスからでも読み出し、書き込み用にこれをオー
88 プンすることができる。ただし、これに対する全ての入出力操作に先立って
89 その両端がオープンされている必要がある。FIFOを読み出し用にオープンする
90 と、通常他のプロセスによって同じFIFOが書き込み用にオープンされるまでブ
92 FIFOスペシャルファイルをブロックせずに扱う方法については
95 .\"O .SH "RETURN VALUE"
100 .\"O In the case of an error, \-1 is returned (in which case, \fIerrno\fP
101 .\"O is set appropriately).
105 エラーの場合 \-1 を返す (また \fIerrno\fP が適切に設定される)。
110 .\"O One of the directories in \fIpathname\fP did not allow search
111 .\"O (execute) permission.
112 \fIpathname\fP の中のディレクトリの一つに対し検索(実行)許可がない。
115 .\"O \fIpathname\fP already exists.
116 .\"O This includes the case where
118 .\"O is a symbolic link, dangling or not.
119 \fIpathname\fP がすでに存在する。
122 が(リンク切れかどうかに関わらず)シンボリックリンクである場合も含む。
125 .\"O Either the total length of \fIpathname\fP is greater than
126 .\"O \fBPATH_MAX\fP, or an individual filename component has a length
127 .\"O greater than \fBNAME_MAX\fP.
128 .\"O In the GNU system, there is no imposed
129 .\"O limit on overall filename length, but some file systems may place
130 .\"O limits on the length of a component.
131 \fIpathname\fP の長さが \fBPATH_MAX\fP を超えているか、個々のファイル
132 名部分の長さが \fBNAME_MAX\fP を超えている。GNUシステムにおいては、ファ
133 イル名の全体の長さに対しては制限は課せられていないが、ファイルシステム
134 によっては各部分の長さに制限のある可能性がある。
137 .\"O A directory component in \fIpathname\fP does not exist or is a
138 .\"O dangling symbolic link.
139 \fIpathname\fP の中のディレクトリ部分が存在しないか、リンク先のないシ
143 .\"O The directory or file system has no room for the new file.
144 ディレクトリまたはファイルシステムに新規ファイルを作成する余地がない。
147 .\"O A component used as a directory in \fIpathname\fP is not, in fact, a
149 \fIpathname\fP 中でディレクトリとして使用されている部分が実際にはディ
153 .\"O \fIpathname\fP refers to a read-only file system.
154 \fIpathname\fP が読み取り専用のファイルシステムを指している。
155 .\"O .SH "CONFORMING TO"