OSDN Git Service

(split) LDP: Update draft pages
[linuxjm/LDP_man-pages.git] / draft / man3 / mkfifo.3
1 .\" This manpage is Copyright (C) 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" changed section from 2 to 3, aeb, 950919
26 .\"
27 .\"*******************************************************************
28 .\"
29 .\" This file was generated with po4a. Translate the source file.
30 .\"
31 .\"*******************************************************************
32 .\"
33 .\" Japanese Version Copyright (c) 1998 George Momma
34 .\"         all rights reserved.
35 .\" Translated Mon May 25 23:11:03 JST 1998
36 .\"         by George Momma <momma@wakhok.ac.jp>
37 .\" Updated 1999-12-11 by Kentaro Shirakata <argrath@ub32.org>
38 .\" Updated 2008-07-30 by Kentaro Shirakata <argrath@ub32.org>
39 .\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
40 .\"
41 .TH MKFIFO 3 2013\-01\-27 GNU "Linux Programmer's Manual"
42 .SH 名前
43 mkfifo \- FIFOスペシャルファイル(名前付きパイプ)を作成する
44 .SH 書式
45 .nf
46 \fB#include <sys/types.h>\fP
47 \fB#include <sys/stat.h>\fP
48 .sp
49 \fBint mkfifo(const char *\fP\fIpathname\fP\fB, mode_t \fP\fImode\fP\fB);\fP
50 .fi
51 .SH 説明
52 \fBmkfifo\fP()  は名前 \fIpathname\fP を持つFIFOスペシャルファイルを作成 する。FIFOの許可モードは \fImode\fP
53 で指定され、プロセスの \fBumask\fP によって通常の方式で変更を受ける: 作成されたファイルの許可 モードは \fB(\fP\fImode\fP\fB &
54 ~umask)\fP となる。
55 .PP
56 FIFOスペシャルファイルはパイプに似ているが、作成のされ方のみが異なって いる。FIFOスペシャルファイルは名前のない通信路ではなく、
57 \fBmkfifo\fP()  の呼び出しによりファイルシステムの中に加えられる。
58 .PP
59 ひとたびこのようにしてFIFOスペシャルファイルが作成されると、通常のファ イルと同じように、どのプロセスからでも読み出し、書き込み用にこれをオー
60 プンすることができる。ただし、これに対する全ての入出力操作に先立って その両端がオープンされている必要がある。FIFOを読み出し用にオープンする
61 と、通常他のプロセスによって同じFIFOが書き込み用にオープンされるまでブ ロックされ、逆の場合も同様である。
62 FIFOスペシャルファイルをブロックせずに扱う方法については \fBfifo\fP(7)  を参照のこと。
63 .SH 返り値
64 成功した場合 \fBmkfifo\fP()  は 0 を返す。 エラーの場合 \-1 を返す (また \fIerrno\fP が適切に設定される)。
65 .SH エラー
66 .TP 
67 \fBEACCES\fP
68 \fIpathname\fP の中のディレクトリの一つに対し検索(実行)許可がない。
69 .TP 
70 \fBEDQUOT\fP
71 ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。
72 .TP 
73 \fBEEXIST\fP
74 \fIpathname\fP がすでに存在する。 これには \fIpathname\fP がシンボリックリンクである場合も含まれる
75 (シンボリックリンクがリンク切れか (dangling) どうかは関係ない)。
76 .TP 
77 \fBENAMETOOLONG\fP
78 \fIpathname\fP の長さが \fBPATH_MAX\fP を超えているか、個々のファイル 名部分の長さが \fBNAME_MAX\fP
79 を超えている。GNUシステムにおいては、ファ イル名の全体の長さに対しては制限は課せられていないが、ファイルシステム
80 によっては各部分の長さに制限のある可能性がある。
81 .TP 
82 \fBENOENT\fP
83 \fIpathname\fP 中のディレクトリ部分が存在しない、 もしくはリンク先の無いシンボリックリンクである。
84 .TP 
85 \fBENOSPC\fP
86 ディレクトリまたはファイルシステムに新規ファイルを作成する余地がない。
87 .TP 
88 \fBENOTDIR\fP
89 \fIpathname\fP 中のディレクトリ要素が、実際にはディレクトリでない。
90 .TP 
91 \fBEROFS\fP
92 \fIpathname\fP が読み取り専用のファイルシステムを指している。
93 .SH 準拠
94 POSIX.1\-2001.
95 .SH 関連項目
96 \fBmkfifo\fP(1), \fBclose\fP(2), \fBopen\fP(2), \fBread\fP(2), \fBstat\fP(2), \fBumask\fP(2),
97 \fBwrite\fP(2), \fBmkfifoat\fP(3), \fBfifo\fP(7)
98 .SH この文書について
99 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
100 である。プロジェクトの説明とバグ報告に関する情報は
101 http://www.kernel.org/doc/man\-pages/ に書かれている。