aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-05-16 10:32:27 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-08-18 17:01:47 -0500
commit1e40dbf524b335ccfc29c1af77acb9f42c53e991 (patch)
tree3ea42d2679dc4529822fac0966bd2a300573421d
parent375ef2862f00cbf89b6368d781104a59315b81ec (diff)
downloadman-pages-1e40dbf524b335ccfc29c1af77acb9f42c53e991.tar.gz
readlink.2: Glibc falls back to readlink() on kernels that lack readlinkat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/readlink.213
1 files changed, 13 insertions, 0 deletions
diff --git a/man2/readlink.2 b/man2/readlink.2
index 19102e1769..989f7daa1f 100644
--- a/man2/readlink.2
+++ b/man2/readlink.2
@@ -253,6 +253,19 @@ also addresses a common portability problem when using
for the buffer size,
as this constant is not guaranteed to be defined per POSIX
if the system does not have such limit.
+.SS Glibc notes
+On older kernels where
+.BR readlinkat ()
+is unavailable, the glibc wrapper function falls back to the use of
+.BR readlink ().
+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 EXAMPLE
The following program allocates the buffer needed by
.BR readlink ()