OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man3 / tempnam.3
1 .\" Copyright (c) 1999 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Japanese Version Copyright (c) 1997-2000 Kazuyuki Tanisako and NAKANO Takeo
24 .\"         all rights reserved.
25 .\" Translated 1997-05-17, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
26 .\" Modified 1997-05-27, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
27 .\" Modified 1998-02-04, Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
28 .\" Updated and Modified 2000-10-12, NAKANO Takeo <nakano@apm.seikei.ac.jp>
29 .\" Updated 2006-04-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.29
30 .\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
31 .\"
32 .\"WORD:        temporary file          ¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë
33 .\"WORD:        filename                ¥Õ¥¡¥¤¥ë̾
34 .\"WORD:        function                ´Ø¿ô
35 .\"WORD:        directory               ¥Ç¥£¥ì¥¯¥È¥ê
36 .\"WORD:        environment variable    ´Ä¶­ÊÑ¿ô
37 .\"WORD:        argument                °ú¤­¿ô
38 .\"WORD:        storage                 ÊݸÎΰè
39 .\"WORD:        pointer                 ¥Ý¥¤¥ó¥¿¡¼
40 .\"
41 .TH TEMPNAM 3  2008-08-06 "" "Linux Programmer's Manual"
42 .SH Ì¾Á°
43 tempnam \- ¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë¤Î̾Á°¤òºîÀ®¤¹¤ë
44 .SH ½ñ¼°
45 .nf
46 .B #include <stdio.h>
47 .sp
48 .BI "char *tempnam(const char *" dir ", const char *" pfx );
49 .fi
50 .sp
51 .in -4n
52 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
53 .RB ( feature_test_macros (7)
54 »²¾È):
55 .in
56 .sp
57 .BR tempnam ():
58 _BSD_SOURCE || _SVID_SOURCE
59 .SH ÀâÌÀ
60 .BR tempnam ()
61 ´Ø¿ô¤Ï¥Õ¥¡¥¤¥ë̾¤È¤·¤ÆÀµ¤·¤¤Ê¸»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¡¼¤òÊÖ¤¹¡£
62 ¤³¤Î¥Õ¥¡¥¤¥ë̾¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤Ï¡¢
63 .BR tempnam ()
64 ¤¬¥Á¥§¥Ã¥¯¤·¤¿»þÅÀ¤Ë¤ª¤¤¤Æ¤Ï¸ºß¤·¤Ê¤¤ (¤·¤Ê¤«¤Ã¤¿)¡£
65 .I pfx
66 ¤¬ NULL ¤Ç¤Ê¤¤ 5 ¥Ð¥¤¥È°ÊÆâ¤Îʸ»úÎó¤Ç¤¢¤ì¤Ð¡¢
67 À¸À®¤µ¤ì¤ë¥Ñ¥¹Ì¾¤Î¤¦¤Á¤Î¥Õ¥¡¥¤¥ë̾¤ÎÉôʬ¤Ï
68 .I pfx
69 ¤«¤é»Ï¤Þ¤ë¤â¤Î¤Ë¤Ê¤ë¡£
70 À¸À®¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ÎÉôʬ¤Ï¡¢¡ÖŬÀڡפǤʤ±¤ì¤Ð¤Ê¤é¤Ê¤¤
71 (ÂçÄñ¤Î¾ì¹ç¡¢¡ÖŬÀڡפǤ¢¤ë¤¿¤á¤Ë¤Ï¤Þ¤º¾¯¤Ê¤¯¤È¤â
72 ½ñ¤­¹þ¤ß²Äǽ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤)¡£
73
74 ŬÀڤʥǥ£¥ì¥¯¥È¥ê¤Îõº÷¤Ï¡¢°Ê²¼¤Î¼ê½ç¤Ë¤·¤¿¤¬¤Ã¤Æ¹Ô¤ï¤ì¤ë¡£
75 .TP 3
76 a)
77 ´Ä¶­ÊÑ¿ô
78 .B TMPDIR
79 ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Æ¡¢
80 ¤½¤ÎÆâÍƤ¬Å¬Àڤʥǥ£¥ì¥¯¥È¥ê¤Î̾Á°¤Ê¤é¡¢¤½¤ì¤òÍѤ¤¤ë¡£
81 .TP
82 b)
83 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢
84 .I dir
85 °ú¤­¿ô¤¬ NULL ¤Ç¤Ê¤¤Ê¸»úÎó¤Ç¤«¤ÄŬÀڤʤ顢¤½¤ì¤òÍѤ¤¤ë¡£
86 .TP
87 c)
88 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢
89 .RI ( <stdio.h>
90 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë)
91 .I P_tmpdir
92 ¤¬Å¬Àڤʤ顢¤½¤ì¤òÍѤ¤¤ë¡£
93 .TP
94 d)
95 ºÇ¸å¤Ë¼ÂÁõ¤ÇÄêµÁ¤µ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤¬ÍѤ¤¤é¤ì¤ë¤³¤È¤Ë¤Ê¤ë¡£
96 .PP
97 .BR tempnam ()
98 ¤¬ÊÖ¤¹Ê¸»úÎó¤Ï
99 .BR malloc (3)
100 ¤ò»È¤Ã¤Æ³ÎÊݤµ¤ì¤ë¡£¤½¤Î¤¿¤á¡¢
101 .BR free (3)
102 ¤Ç²òÊü¤¹¤Ù¤­¤Ç¤¢¤ë¡£
103 .SH ÊÖ¤êÃÍ
104 .BR tempnam ()
105 ´Ø¿ô¤Ï¾¤È½Å¤Ê¤é¤Ê¤¤¥Æ¥ó¥Ý¥é¥ê¥Õ¥¡¥¤¥ë̾¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
106 ¾¤È½Å¤Ê¤é¤Ê¤¤Ì¾Á°¤¬À¸À®¤Ç¤­¤Ê¤±¤ì¤Ð NULL ¤òÊÖ¤¹¡£
107 .SH ¥¨¥é¡¼
108 .TP
109 .B ENOMEM
110 ÊݸÎΰè¤Î³ä¤êÅö¤Æ¤Ë¼ºÇÔ¤·¤¿¡£
111 .SH ½àµò
112 SVr4, 4.3BSD, POSIX.1-2001.
113 POSIX.1-2008 ¤Ï
114 .BR tempnam ()
115 ¤òÇÑ»ßͽÄê¤È¤·¤Æ¤¤¤ë¡£
116 .SH Ãí°Õ
117 .BR tempnam ()
118 ¤Ï¿ä¬¤¬Æñ¤·¤¤Ì¾Á°¤òÀ¸À®¤¹¤ë¤¬¡¢¤½¤ì¤Ë¤â¤«¤«¤ï¤é¤º¡¢
119 .BR tempnam ()
120 ¤¬¥Ñ¥¹Ì¾¤òÊÖ¤·¤Æ¤«¤é¡¢¥×¥í¥°¥é¥à¤¬¤½¤Î¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤¹¤ë
121 ¤Þ¤Ç¤Î´Ö¤Ë¡¢ÊÌ¤Î¥×¥í¥°¥é¥à¤¬Æ±¤¸¥Ñ¥¹Ì¾¤Ç¡¢¥Õ¥¡¥¤¥ë¤ò
122 .BR open (2)
123 ¤ÇºîÀ®¤·¤¿¤ê¡¢¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤òºîÀ®¤·¤¿¤ê¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
124 ¤³¤ì¤Ï¥»¥­¥å¥ê¥Æ¥£¥Û¡¼¥ë¤Ë¤Ä¤Ê¤¬¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
125 ¤½¤Î¤è¤¦¤Ê²ÄǽÀ­¤ò²óÈò¤¹¤ë¤¿¤á¤Ë¤Ï¡¢
126 .BR open (2)
127 ¤Î
128 .B O_EXCL
129 ¥Õ¥é¥°¤ò»È¤Ã¤Æ¥Ñ¥¹Ì¾¤ò¥ª¡¼¥×¥ó¤¹¤ì¤Ð¤è¤¤¡£
130 ¤â¤Ã¤È¤¤¤¤¤Î¤Ï¡¢
131 .BR mkstemp (3)
132 ¤ä
133 .BR tmpfile (3)
134 ¤ò»È¤¦¤³¤È¤Ç¤¢¤ë¡£
135
136 SUSv2 ¤Ç¤Ï
137 .B TMPDIR
138 ¤ËÉÕ¤¤¤Æ¸ÀµÚ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
139 glibc ¤Ï¡¢¥×¥í¥°¥é¥à¤¬ set-user-ID ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¸Â¤Ã¤Æ¤³¤ì¤òÍѤ¤¤ë¡£
140 SVr4 ¤Ç¤Ï \fBd)\fP ¤Ç»ÈÍѤµ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ò
141 .I /tmp
142 ¤ÈÄê¤á¤Æ¤¤¤ë (glibc ¤â¤³¤ÎÄ̤ê¤Ç¤¢¤ë)¡£
143 .LP
144 ¥Ñ¥¹Ì¾¤òÊÖ¤¹¤Î¤Ë»ÈÍѤ¹¤ë¥á¥â¥ê¤òưŪ¤Ë³ÎÊݤ¹¤ë¤Î¤Ç¡¢
145 .BR tmpnam (3)
146 ¤È°ã¤¤¡¢
147 .BR tempnam ()
148 ¤Ï¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤¢¤ê¡¢¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ç¤¢¤ë¡£
149 .LP
150 .BR tempnam ()
151 ´Ø¿ô¤ÏºÇÂç
152 .B TMP_MAX
153 ²ó¤Þ¤Ç¡¢¸Æ¤Ó½Ð¤µ¤ì¤ëÅ٤˰ۤʤëʸ»úÎó¤òºîÀ®¤¹¤ë
154 .RB ( TMP_MAX
155 ¤Ï
156 .I <stdio.h>
157 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë)¡£
158 ¤â¤·
159 .B TMP_MAX
160 ²ó°Ê¾å¸Æ¤Ó½Ð¤µ¤ì¤¿¾ì¹ç¡¢Æ°ºî¤Ï¼ÂÁõ°Í¸¤Ç¤¢¤ë¡£
161 .LP
162 .BR tempnam ()
163 ¤ÏºÇÂç¤Ç
164 .I pfx
165 ¤ÎÀèƬ 5 ¥Ð¥¤¥È¤ò»ÈÍѤ¹¤ë¡£
166
167 ¾¤È½Å¤Ê¤é¤Ê¤¤Ì¾Á°¤¬¸«¤Ä¤±¤é¤ì¤Ê¤«¤Ã¤¿¾ì¹ç¡¢glibc ¤Î
168 .BR tempnam ()
169 ¤Î¼ÂÁõ¤Ï¥¨¥é¡¼
170 .B EEXIST
171 ¤Ç¼ºÇÔ¤¹¤ë¡£
172 .SH ¥Ð¥°
173 ¡ÖŬÀڡפȤ¤¤¦¸ÀÍÕ¤ÎÀµ³Î¤Ê°ÕÌ£¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
174 ¥Ç¥£¥ì¥¯¥È¥ê¤ËÂФ·¤Æ¤É¤ÎÄøÅ٤Υ¢¥¯¥»¥¹¸¢¸Â¤¬É¬ÍפʤΤ«¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
175
176 ·è¤·¤Æ¤³¤Î´Ø¿ô¤ò»È¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£Âå¤ï¤ê¤Ë
177 .BR mkstemp (3)
178 ¤«
179 .BR tmpfile (3)
180 ¤ò»È¤¦¤³¤È¡£
181 .SH ´ØÏ¢¹àÌÜ
182 .BR mkstemp (3),
183 .BR mktemp (3),
184 .BR tmpfile (3),
185 .BR tmpnam (3)