mirror of https://github.com/mkerrisk/man-pages
readlink.2: Glibc falls back to readlink() on kernels that lack readlinkat()
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
375ef2862f
commit
1e40dbf524
|
@ -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 ()
|
||||
|
|
Loading…
Reference in New Issue