diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-05-16 10:37:03 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-08-18 17:01:47 -0500 |
| commit | c71a9ed732d3b22fd64ac6dbfd2dcc4e22cb5429 (patch) | |
| tree | 7f83633b4d8091bf1a3bf190291e4322ee1ce731 | |
| parent | 1e40dbf524b335ccfc29c1af77acb9f42c53e991 (diff) | |
| download | man-pages-c71a9ed732d3b22fd64ac6dbfd2dcc4e22cb5429.tar.gz | |
link.2: Glibc falls back to link() on kernels that lack linkat()
Unless 'flags' contains AT_SYMLINK_FOLLOW.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/link.2 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/man2/link.2 b/man2/link.2 index 0725cd2b85..492a71aa42 100644 --- a/man2/link.2 +++ b/man2/link.2 @@ -382,6 +382,26 @@ is dereferenced if it is a symbolic link. For precise control over the treatment of symbolic links when creating a link, use .BR linkat (2). +.SS Glibc notes +On older kernels where +.BR linkat () +is unavailable, the glibc wrapper function falls back to the use of +.BR link (), +unless the +.B AT_SYMLINK_FOLLOW +is specified. +When +.I oldpath +and +.I newpath +are relative pathnames, +glibc constructs pathnames based on the symbolic links in +.IR /proc/self/fd +that correspond to the +.I olddirfd +and +.IR newdirfd +arguments. .SH BUGS On NFS filesystems, the return code may be wrong in case the NFS server performs the link creation and dies before it can say so. |
