OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / release / man2 / linkat.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
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 .\" FIXME: Linux 2.6.39 added AT_EMPTY_PATH
26 .\"
27 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
28 .\"         all rights reserved.
29 .\" Translated 2006-09-30 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
30 .\"
31 .TH LINKAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
32 .SH Ì¾Á°
33 linkat \-  ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤˥ե¡¥¤¥ë¥ê¥ó¥¯¤òºîÀ®¤¹¤ë
34 .SH ½ñ¼°
35 .nf
36 .B #include <fcntl.h>           /* AT_* Äê¿ô¤ÎÄêµÁ */
37 .B #include <unistd.h>
38 .sp
39 .BI "int linkat(int " olddirfd ", const char *" oldpath ,
40 .BI "           int " newdirfd ", const char *" newpath ", int " flags );
41 .fi
42 .sp
43 .in -4n
44 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
45 .RB ( feature_test_macros (7)
46 »²¾È):
47 .in
48 .sp
49 .BR linkat ():
50 .PD 0
51 .ad l
52 .RS 4
53 .TP 4
54 glibc 2.10 °Ê¹ß:
55 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
56 .TP
57 glibc 2.10 ¤è¤êÁ°:
58 _ATFILE_SOURCE
59 .RE
60 .ad
61 .PD
62 .SH ÀâÌÀ
63 .BR linkat ()
64 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤¹¤ë°ã¤¤°Ê³°¤Ï¡¢
65 .BR link (2)
66 ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
67
68 .I oldpath
69 ¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹Ì¾¤Ç¤¢¤ë¾ì¹ç¡¢
70 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
71 .I olddirfd
72 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
73 .RB ( link (2)
74 ¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
75 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹¤È¤Ê¤ë)¡£
76
77 .I oldpath
78 ¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
79 .I olddirfd
80 ¤¬ÆÃÊ̤ÊÃÍ
81 .B AT_FDCWD
82 ¤Ç¤¢¤ë¾ì¹ç¡¢
83 .I oldpath
84 ¤Ï
85 .RB ( link (2)
86 ¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
87 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
88
89 .I oldpath
90 ¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
91 .I olddirfd
92 ¤Ï̵»ë¤µ¤ì¤ë¡£
93
94 .I newpath
95 ¤Î²ò¼á¤Ï
96 .I oldpath
97 ¤ÈƱÍͤǤ¢¤ë¤¬¡¢
98 ÁêÂХѥ¹Ì¾¤Ï¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
99 .I newdirfd
100 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
101
102 ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
103 .I oldpath
104 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Î¾ì¹ç¡¢
105 .RB ( link (2)
106 ƱÍÍ)
107 .BR linkat ()
108 ¤Ï
109 .I oldpath
110 ¤Î»²¾È¤Î²ò·è¤ò¹Ô¤ï¤Ê¤¤¡£
111 Linux 2.6.18 °Ê¹ß¤Ç¤Ï¡¢
112 .B AT_SYMLINK_FOLLOW
113 ¥Õ¥é¥°¤ò
114 .I flags
115 ¤Ë»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤³¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤È¡¢
116 .I oldpath
117 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Î¾ì¹ç¡¢
118 .I oldpath
119 ¤Î»²¾È¤Î²ò·è¤ò¹Ô¤¦¡£
120 2.6.18 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
121 .I flags
122 °ú¤­¿ô¤Ï»ÈÍѤµ¤ì¤º¡¢
123 0 ¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤«¤Ã¤¿¡£
124 .SH ÊÖ¤êÃÍ
125 À®¸ù¤·¤¿¾ì¹ç¡¢
126 .BR linkat ()
127 ¤Ï 0 ¤òÊÖ¤¹¡£
128 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
129 .I errno
130 ¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
131 .SH ¥¨¥é¡¼
132 .BR link (2)
133 ¤ÈƱ¤¸¥¨¥é¡¼¤¬
134 .BR linkat ()
135 ¤Ç¤âµ¯¤³¤ë¡£
136 .BR linkat ()
137 ¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
138 .TP
139 .B EBADF
140 .I olddirfd
141 ¤Þ¤¿¤Ï
142 .I newdirfd
143 ¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
144 .TP
145 .B ENOTDIR
146 .I oldpath
147 ¤¬ÁêÂХѥ¹¤Ç¡¢¤«¤Ä
148 .I olddirfd
149 ¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
150 ¤Þ¤¿¤Ï
151 .I newpath
152 ¤È
153 .I newdirfd
154 ¤Ë¤Ä¤¤¤Æ¡¢Æ±ÍͤΤ³¤È¤¬µ¯¤­¤Æ¤¤¤ë¡£
155 .SH ¥Ð¡¼¥¸¥ç¥ó
156 .BR linkat ()
157 ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
158 .SH ½àµò
159 POSIX.1-2008.
160 .SH Ãí°Õ
161 .BR linkat ()
162 ¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
163 .BR openat (2)
164 ¤ò»²¾È¤¹¤ë¤³¤È¡£
165 .SH ´ØÏ¢¹àÌÜ
166 .BR link (2),
167 .BR openat (2),
168 .BR path_resolution (7),
169 .BR symlink (7)