mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
1e40dbf524
commit
c71a9ed732
20
man2/link.2
20
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
|
For precise control over the treatment of symbolic links when
|
||||||
creating a link, use
|
creating a link, use
|
||||||
.BR linkat (2).
|
.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
|
.SH BUGS
|
||||||
On NFS filesystems, the return code may be wrong in case the NFS server
|
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.
|
performs the link creation and dies before it can say so.
|
||||||
|
|
Loading…
Reference in New Issue