OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / mkfifo.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 1995 James R. Van Zandt <jrv@vanzandt.mv.com>
4 .\"
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.
8 .\"
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.
13 .\"
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
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" changed section from 2 to 3, aeb, 950919
26 .\"
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>
33 .\"
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"
40 .\"O .SH NAME
41 .SH Ì¾Á°
42 .\"O mkfifo \- make a FIFO special file (a named pipe)
43 mkfifo \- FIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë(̾Á°ÉÕ¤­¥Ñ¥¤¥×)¤òºîÀ®¤¹¤ë
44 .\"O .SH SYNOPSIS
45 .SH ½ñ¼°
46 .nf
47 .B #include <sys/types.h>
48 .B #include <sys/stat.h>
49 .sp
50 .BI "int mkfifo(const char *" pathname ", mode_t " mode );
51 .fi
52 .\"O .SH DESCRIPTION
53 .SH ÀâÌÀ
54 .\"O .BR mkfifo ()
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.
60 .BR mkfifo ()
61 ¤Ï̾Á° \fIpathname\fP ¤ò»ý¤ÄFIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë¤òºîÀ®
62 ¤¹¤ë¡£FIFO¤Îµö²Ä¥â¡¼¥É¤Ï \fImode\fP ¤Ç»ØÄꤵ¤ì¡¢¥×¥í¥»¥¹¤Î
63 \fBumask\fP ¤Ë¤è¤Ã¤ÆÄ̾ï¤ÎÊý¼°¤ÇÊѹ¹¤ò¼õ¤±¤ë: ºîÀ®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Îµö²Ä
64 ¥â¡¼¥É¤Ï \fB(\fP\fImode\fP\fB & ~umask)\fP ¤È¤Ê¤ë¡£
65 .PP
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
70 .\"O calling
71 .\"O .BR mkfifo ().
72 FIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë¤Ï¥Ñ¥¤¥×¤Ë»÷¤Æ¤¤¤ë¤¬¡¢ºîÀ®¤Î¤µ¤ìÊý¤Î¤ß¤¬°Û¤Ê¤Ã¤Æ
73 ¤¤¤ë¡£FIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë¤Ï̾Á°¤Î¤Ê¤¤ÄÌ¿®Ï©¤Ç¤Ï¤Ê¤¯¡¢
74 .BR mkfifo ()
75 ¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤ê¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ÎÃæ¤Ë²Ã¤¨¤é¤ì¤ë¡£
76 .PP
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.
83 .\"O See
84 .\"O .BR fifo (7)
85 .\"O for nonblocking handling of FIFO special files.
86 ¤Ò¤È¤¿¤Ó¤³¤Î¤è¤¦¤Ë¤·¤ÆFIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë¤¬ºîÀ®¤µ¤ì¤ë¤È¡¢Ä̾ï¤Î¥Õ¥¡
87 ¥¤¥ë¤ÈƱ¤¸¤è¤¦¤Ë¡¢¤É¤Î¥×¥í¥»¥¹¤«¤é¤Ç¤âÆɤ߽Ф·¡¢½ñ¤­¹þ¤ßÍѤˤ³¤ì¤ò¥ª¡¼
88 ¥×¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤¿¤À¤·¡¢¤³¤ì¤ËÂФ¹¤ëÁ´¤Æ¤ÎÆþ½ÐÎÏÁàºî¤ËÀèΩ¤Ã¤Æ
89 ¤½¤Îξü¤¬¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£FIFO¤òÆɤ߽Ф·ÍѤ˥ª¡¼¥×¥ó¤¹¤ë
90 ¤È¡¢Ä̾ï¾¤Î¥×¥í¥»¥¹¤Ë¤è¤Ã¤ÆƱ¤¸FIFO¤¬½ñ¤­¹þ¤ßÍѤ˥ª¡¼¥×¥ó¤µ¤ì¤ë¤Þ¤Ç¥Ö
91 ¥í¥Ã¥¯¤µ¤ì¡¢µÕ¤Î¾ì¹ç¤âƱÍͤǤ¢¤ë¡£
92 FIFO¥¹¥Ú¥·¥ã¥ë¥Õ¥¡¥¤¥ë¤ò¥Ö¥í¥Ã¥¯¤»¤º¤Ë°·¤¦ÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï
93 .BR fifo (7)
94 ¤ò»²¾È¤Î¤³¤È¡£
95 .\"O .SH "RETURN VALUE"
96 .SH ÊÖ¤êÃÍ
97 .\"O On success
98 .\"O .BR mkfifo ()
99 .\"O returns 0.
100 .\"O In the case of an error, \-1 is returned (in which case, \fIerrno\fP
101 .\"O is set appropriately).
102 À®¸ù¤·¤¿¾ì¹ç
103 .BR mkfifo ()
104 ¤Ï 0 ¤òÊÖ¤¹¡£
105 ¥¨¥é¡¼¤Î¾ì¹ç \-1 ¤òÊÖ¤¹ (¤Þ¤¿ \fIerrno\fP ¤¬Å¬ÀÚ¤ËÀßÄꤵ¤ì¤ë)¡£
106 .\"O .SH ERRORS
107 .SH ¥¨¥é¡¼
108 .TP
109 .B EACCES
110 .\"O One of the directories in \fIpathname\fP did not allow search
111 .\"O (execute) permission.
112 \fIpathname\fP ¤ÎÃæ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î°ì¤Ä¤ËÂФ·¸¡º÷(¼Â¹Ô)µö²Ä¤¬¤Ê¤¤¡£
113 .TP
114 .B EEXIST
115 .\"O \fIpathname\fP already exists.
116 .\"O This includes the case where
117 .\"O .I pathname
118 .\"O is a symbolic link, dangling or not.
119 \fIpathname\fP ¤¬¤¹¤Ç¤Ë¸ºß¤¹¤ë¡£
120 ¤³¤ì¤Ë¤Ï¡¢
121 .I pathname
122 ¤¬(¥ê¥ó¥¯Àڤ줫¤É¤¦¤«¤Ë´Ø¤ï¤é¤º)¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¢¤ë¾ì¹ç¤â´Þ¤à¡£
123 .TP
124 .B ENAMETOOLONG
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 ¤Ë¤è¤Ã¤Æ¤Ï³ÆÉôʬ¤ÎŤµ¤ËÀ©¸Â¤Î¤¢¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
135 .TP
136 .B ENOENT
137 .\"O A directory component in \fIpathname\fP does not exist or is a
138 .\"O dangling symbolic link.
139 \fIpathname\fP ¤ÎÃæ¤Î¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤¬Â¸ºß¤·¤Ê¤¤¤«¡¢¥ê¥ó¥¯Àè¤Î¤Ê¤¤¥·
140 ¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Ç¤¢¤ë¡£
141 .TP
142 .B ENOSPC
143 .\"O The directory or file system has no room for the new file.
144 ¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤¿¤Ï¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¿·µ¬¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë;ÃϤ¬¤Ê¤¤¡£
145 .TP
146 .B ENOTDIR
147 .\"O A component used as a directory in \fIpathname\fP is not, in fact, a
148 .\"O directory.
149 \fIpathname\fP Ãæ¤Ç¥Ç¥£¥ì¥¯¥È¥ê¤È¤·¤Æ»ÈÍѤµ¤ì¤Æ¤¤¤ëÉôʬ¤¬¼ÂºÝ¤Ë¤Ï¥Ç¥£
150 ¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¤¡£
151 .TP
152 .B EROFS
153 .\"O \fIpathname\fP refers to a read-only file system.
154 \fIpathname\fP ¤¬Æɤ߼è¤êÀìÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»Ø¤·¤Æ¤¤¤ë¡£
155 .\"O .SH "CONFORMING TO"
156 .SH ½àµò
157 POSIX.1-2001.
158 .\"O .SH "SEE ALSO"
159 .SH ´ØÏ¢¹àÌÜ
160 .BR mkfifo (1),
161 .BR close (2),
162 .BR open (2),
163 .BR read (2),
164 .BR stat (2),
165 .BR umask (2),
166 .BR write (2),
167 .BR mkfifoat (3),
168 .BR fifo (7)