OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man2 / link.2
index f105083..7cc8558 100644 (file)
@@ -45,7 +45,7 @@
 .\" Updated 2008-09-07, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.08
 .\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
 .\"
-.TH LINK 2 2014\-03\-19 Linux "Linux Programmer's Manual"
+.TH LINK 2 2014\-05\-10 Linux "Linux Programmer's Manual"
 .SH 名前
 link, linkat \- ファイルの新しい名前を作成する
 .SH 書式
@@ -105,17 +105,28 @@ _ATFILE_SOURCE
 \fBAT_EMPTY_PATH\fP (Linux 2.6.39 以降)
 .\" commit 11a7b371b64ef39fc5fb1b6f2218eef7c4d035e3
 .\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
-\fIoldpath\fP が空文字列の場合、 \fIolddirfd\fP が参照するファイルへのリンクを作成する (\fIolddirfd\fP は
-\fBopen\fP(2) の \fBO_PATH\fP フラグを使って取得する)。 この場合、 \fIolddirfd\fP
-はディレクトリではなくファイルを参照していなければならない。 このフラグを使用するためには、 呼び出し元は \fBCAP_DAC_READ_SEARCH\fP
-ケーパビリティを持っていなければならない。 これにより、 任意のユーザーが UNIX
-ドメインソケット経由で受信したファイルディスクリプターを使ってハードリンクを作成することがないようになっている (\fBunix\fP(7) の
-\fBSCM_RIGHTS\fP の議論を参照)。 このフラグは Linux 固有で、 この定義を得るには \fB_GNU_SOURCE\fP を定義すること。
+If \fIoldpath\fP is an empty string, create a link to the file referenced by
+\fIolddirfd\fP (which may have been obtained using the \fBopen\fP(2)  \fBO_PATH\fP
+flag).  In this case, \fIolddirfd\fP can refer to any type of file, not just a
+directory.  This will generally not work if the file has a link count of
+zero (files created with \fBO_TMPFILE\fP and without \fBO_EXCL\fP are an
+exception).  The caller must have the \fBCAP_DAC_READ_SEARCH\fP capability in
+order to use this flag.  This flag is Linux\-specific; define \fB_GNU_SOURCE\fP
+to obtain its definition.
 .TP 
 \fBAT_SYMLINK_FOLLOW\fP (Linux 2.6.18 以降)
-\fBlinkat\fP() は (\fBlink\fP() 同様) デフォルトでは \fIoldpath\fP がシンボリックリンクの場合リンクの展開を行わない。
-フラグ \fBAT_SYMLINK_FOLLOW\fP を \fIflags\fP に指定することができ、指定した場合 \fIoldpath\fP
-がシンボリックリンクの場合リンクの展開が行われる。
+By default, \fBlinkat\fP(), does not dereference \fIoldpath\fP if it is a symbolic
+link (like \fBlink\fP()).  The flag \fBAT_SYMLINK_FOLLOW\fP can be specified in
+\fIflags\fP to cause \fIoldpath\fP to be dereferenced if it is a symbolic link.
+If procfs is mounted, this can be used as an alternative to
+\fBAT_EMPTY_PATH\fP, like this:
+
+.nf
+.in +4n
+linkat(AT_FDCWD, "/proc/self/fd/<fd>", newdirfd,
+       newname, AT_SYMLINK_FOLLOW);
+.in
+.fi
 .PP
 カーネル 2.6.18 より前では、 \fIflags\fP 引き数は未使用で、 0 を指定しなければならなかった。
 .PP
@@ -198,6 +209,11 @@ I/O エラーが発生した。
 
 \fBopen\fP(2) 参照。
 .TP 
+\fBENOENT\fP
+\fIoldpath\fP is a relative pathname and \fIolddirfd\fP refers to a directory that
+has been deleted, or \fInewpath\fP is a relative pathname and \fInewdirfd\fP
+refers to a directory that has been deleted.
+.TP 
 \fBENOTDIR\fP
 \fIoldpath\fP が相対パスで、 \fIolddirfd\fP がディレクトリ以外のファイルを参照している。または \fInewpath\fP と
 \fInewdirfd\fP に関して同じ状況である。
@@ -237,6 +253,6 @@ NFS ファイルシステムでは、NFS サーバーがリンクを作成した
 \fBln\fP(1), \fBopen\fP(2), \fBrename\fP(2), \fBstat\fP(2), \fBsymlink\fP(2), \fBunlink\fP(2),
 \fBpath_resolution\fP(7), \fBsymlink\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。