rename.2: Glibc falls back to rename() when the kernel doesn't have renameat()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-16 10:07:37 +02:00
parent 81428c3a09
commit 387ebb9cd5
1 changed files with 18 additions and 0 deletions

View File

@ -411,6 +411,24 @@ POSIX.1-2008.
.BR renameat2 ()
is Linux-specific.
.SH NOTES
.SS Glibc notes
On older kernels where
.BR renameat ()
is unavailable, the glibc wrapper function falls back to the use of
.BR rename ().
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, you can not assume that if the operation
failed, the file was not renamed.