diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-05-16 10:32:27 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2014-08-18 17:01:47 -0500 |
| commit | 1e40dbf524b335ccfc29c1af77acb9f42c53e991 (patch) | |
| tree | 3ea42d2679dc4529822fac0966bd2a300573421d | |
| parent | 375ef2862f00cbf89b6368d781104a59315b81ec (diff) | |
| download | man-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.2 | 13 |
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 () |
