From d20e418098bffcdfbfdc89626d2d8e80355d9935 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 16 May 2014 11:27:36 +0200 Subject: [PATCH] unlink.2: Glibc falls back to unlink() or rmdir() on kernels that lack unlinkat() Signed-off-by: Michael Kerrisk --- man2/unlink.2 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/man2/unlink.2 b/man2/unlink.2 index ccc05bf46..f0cbf5e3b 100644 --- a/man2/unlink.2 +++ b/man2/unlink.2 @@ -278,6 +278,22 @@ SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008. .BR unlinkat (): POSIX.1-2008. +.SH NOTES +.SS Glibc notes +On older kernels where +.BR unlinkat () +is unavailable, the glibc wrapper function falls back to the use of +.BR unlink (2) +or +.BR rmdir (2). +When +.I pathname +is a relative pathname, +glibc constructs a pathname based on the symbolic link in +.IR /proc/self/fd +that corresponds to the +.IR dirfd +argument. .SH BUGS Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used.