Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (s and S) symlink(2)
mknod() An error is returned if a symbolic link is named as the path
parameter.
open() An error is returned when O_CREAT and O_EXCL are both
specied and the path parameter species an existing symbolic
link.
readlink( ) This function applies only to symbolic links.
remove() A symbolic link can be removed by invoking the remove()
function.
rename() If the le to be renamed is a symbolic link, the symbolic link is
renamed. If the new name refers to an existing symbolic link, the
symbolic link is destroyed.
rmdir() An error is returned if a symbolic link is named as the path
parameter.
unlink() A symbolic link can be removed by invoking unlink().
Execute (search) permission for the directories within a symbolic link are
required to traverse the resolved pathname. Normal permission checks are made
on each component of the symbolic link pathname during its resolution.
Use on Guardian Objects
The symlink( ) function can be used to create a symbolic link between an OSS leset and an
object in the Guardian le system (/G). Symbolic links cannot be created in /G.
Use From the Guardian Environment
The symlink( ) function can be used by a Guardian process when the process has been compiled
using the #dene _XOPEN_SOURCE_EXTENDED 1 feature-test macro or an equivalent com-
piler command option.
The symlink( ) function is one of a set of functions that have the following effects when the rst
of them is called from the Guardian environment:
Two Guardian le-system le numbers (not necessarily the next two
available) are allocated for the root directory and the current working
directory. These le numbers cannot be closed by calling the Guardian
FILE_CLOSE_ procedure.
The current working directory is assigned from the VOLUME attribute
of the Guardian environment =_DEFAULTS DEFINE.
The use of static memory by the process increases slightly.
These effects occur only when the rst of the set of functions is called. The
effects are not cumulative.
NOTES
An absolute pathname that includes a symbolic link for an OSS le on a remote HP NonStop
node is expanded relative to the root leset of the remote node. For example, if path1 is specied
as /usr/bin and path2 is specied as link, then a reference to /E/node1/link is expanded to
/E/node1/usr/bin and identies the /usr/bin directory on the HP NonStop node named NODE1.
527186-003 Hewlett-Packard Company 7179