int symlink(name1, name2) char *name1, *name2;
A symbolic link name2 is created to name1 (name2 is the name of the file created, name1 is the string used in creating the symbolic link). Either name may be an arbitrary path name; the files need not be on the same file system.
The file that the symbolic link points to is used when an open.2v operation is performed on the link. A stat.2v on a symbolic link returns the linked-to file, while an lstat() (refer to stat.2v returns information about the link itself. This can lead to surprising results when a symbolic link is made to a directory. To avoid confusion in programs, the readlink.2 call can be used to read the contents of a symbolic link.
symlink() returns:
The symbolic link is made unless one or more of the following are true:
The new symbolic link cannot be created because the user's quota of disk blocks on the file system which will contain the link has been exhausted.
The user's quota of inodes on the file system on which the file is being created has been exhausted.
A pathname component is longer than {NAME_MAX} (see sysconf.2v while {_POSIX_NO_TRUNC} is in effect (see pathconf.2v
The new symbolic link cannot be created because there is no space left on the file system which will contain the link.
There are no free inodes on the file system on which the file is being created.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97