reads a symbolic link
cc . . . -lc
int readlink (path, buf, bufsiz)
char *path, *buf;
The readlink function reads a symbolic link previously
created by a call to
readlink places the contents of the symbolic link
referred to by path in the buf buffer, which
has the size bufsiz. The contents of the link are not
null terminated when returned.
This routine fails and the buffer is unchanged if one or more of
the following is true:
Search permission is denied for a component of the oath
path or buf extends outside the process's
allocated address space.
The named file is not a symbolic link.
An I/O error occurred while reading from or writing to
Too many symbolic links were encountered in translating
The length of a component of path exceeds 255
characters or the length of path exceeds 1023
The named file does not exist.
The count of characters placed in the buffer is returned if the
call succeeds, or -1 is returned if an error occurs, and the
error value is placed in errno.
readlink is not part of any currently supported standard;
it is an extension of AT&T System V provided by the Santa Cruz Operation.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003