1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
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 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
26 .\" all rights reserved.
27 .\" Translated 2006-09-30 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
29 .TH LINKAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
32 .\"O linkat \- create a file link relative to directory file descriptors
33 linkat \- ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤˥ե¡¥¤¥ë¥ê¥ó¥¯¤òºîÀ®¤¹¤ë
37 .\"O .B #include <fcntl.h> /* Definition of AT_* constants */
38 .B #include <fcntl.h> /* AT_* Äê¿ô¤ÎÄêµÁ */
39 .B #include <unistd.h>
41 .BI "int linkat(int " olddirfd ", const char *" oldpath ,
42 .BI " int " newdirfd ", const char *" newpath ", int " flags );
46 .\"O Feature Test Macro Requirements for glibc (see
47 .\"O .BR feature_test_macros (7)):
48 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
49 .RB ( feature_test_macros (7)
58 .\"O+ Since glibc 2.10:
60 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
62 .\"O Before glibc 2.10:
72 .\"O system call operates in exactly the same way as
74 .\"O except for the differences described in this manual page.
76 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë°ã¤¤¤¬¤¢¤ë°Ê³°¤Ï¡¢
78 ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
80 .\"O If the pathname given in
82 .\"O is relative, then it is interpreted relative to the directory
83 .\"O referred to by the file descriptor
85 .\"O (rather than relative to the current working directory of
86 .\"O the calling process, as is done by
88 .\"O for a relative pathname).
90 ¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹Ì¾¤Ç¤¢¤ë¾ì¹ç¡¢
91 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
93 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
95 ¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
96 ¥«¥ì¥ó¥È¥ï¡¼¥¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹¤È¤Ê¤ë)¡£
102 .\"O is the special value
106 .\"O is interpreted relative to the current working
107 .\"O directory of the calling process (like
110 ¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
118 ¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
119 ¥«¥ì¥ó¥È¥ï¡¼¥¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
123 .\"O is absolute, then
127 ¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
131 .\"O The interpretation of
135 .\"O except that a relative pathname is interpreted relative
136 .\"O to the directory referred to by the file descriptor
142 ÁêÂХѥ¹Ì¾¤Ï¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
144 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
148 .\"O does not dereference
150 .\"O if it is a symbolic link (like
152 .\"O Since Linux 2.6.18, the flag
153 .\"O .B AT_SYMLINK_FOLLOW
154 .\"O can be specified in
158 .\"O to be dereferenced if it is a symbolic link.
159 .\"O Before kernel 2.6.18, the
161 .\"O argument was unused, and had to be specified as 0.
164 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Î¾ì¹ç¡¢
170 ¤Î»²¾È¤Î²ò·è¤ò¹Ô¤ï¤Ê¤¤¡£
171 Linux 2.6.18 °Ê¹ß¤Ç¤Ï¡¢
175 ¤Ë»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤ë¡£¤³¤Î¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤È¡¢
177 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¡¦¥ê¥ó¥¯¤Î¾ì¹ç¡¢
180 2.6.18 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
183 0 ¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤«¤Ã¤¿¡£
184 .\"O .SH "RETURN VALUE"
192 .\"O On error, \-1 is returned and
194 .\"O is set to indicate the error.
195 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
197 ¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
200 .\"O The same errors that occur for
202 .\"O can also occur for
208 .\"O The following additional errors can occur for
211 ¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
217 .\"O is not a valid file descriptor.
221 ¤¬Í¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
227 .\"O is a file descriptor referring to a file other than a directory;
231 ¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
240 ¤Ë¤Ä¤¤¤Æ¡¢Æ±ÍͤΤ³¤È¤¬µ¯¤¤Æ¤¤¤ë¡£
244 .\"O was added to Linux in kernel 2.6.16.
246 ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
247 .\"O .SH "CONFORMING TO"
254 .\"O for an explanation of the need for
257 ¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
264 .BR path_resolution (7),