|READLINK(2)||System Calls Manual||READLINK(2)|
readlinkat — read value of a
char *restrict path, char
*restrict buf, size_t
fd, const char
*path, char *buf,
function places the contents of the symbolic link path
in the buffer buf, which has size
readlink() does not
NUL character to
function is equivalent to
readlink() except that
where path specifies a relative path, the symbolic
link whose contents are read is determined relative to the directory
associated with file descriptor fd instead of the
current working directory.
The call returns the count of characters placed in the buffer if it succeeds, or a -1 if an error occurs, placing the error code in the global variable errno.
readlinkat() will fail if:
NAME_MAXcharacters, or an entire pathname (including the terminating NUL) exceeded
readlinkat() will fail
AT_FDCWDnor a valid file descriptor.
readlinkat() functions conform to
IEEE Std 1003.1-2008 (“POSIX.1”).
readlink() system call first appeared
in 4.1cBSD. The
system call has been available since OpenBSD
|May 31, 2015||OpenBSD-current|