Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
link(2) OSS System Calls Reference Manual
to use this function on any file in a restricted-access fileset. However, Network File System
(NFS) clients are not granted SOA group privileges, even if these clients are accessing the sys-
tem with a user ID that is a member of the SOA security group.
For more information about restricted-access filesets and file privileges, see the Open System Ser-
vices Management and Operations Guide.
Use From the Guardian Environment
The link( ) function is one of a set of functions that have the following effects when the first of
them is called from the Guardian environment:
• Two Guardian file system file numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These file 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 first of the set of functions is called. The effects are not cumu-
lative.
Use on Guardian Objects
Attempting to create a link to a Guardian file (that is, a file within the /G file system) fails and
causes errno to be set to [EINVAL].
NOTES
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
RETURN VALUES
Upon successful completion, the link() function returns the value 0 (zero). If the link() function
fails, the value -1 is returned, no link is created, and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the link( ) function sets errno to the corresponding
value:
[EACCES] The requested link requires writing in a directory with a mode that denies write
permission, or a component of the pathname pointed to by either the path1 or
path2 parameter denies search permission.
[EEXIST] The link named by the path2 parameter already exists.
[EFAULT] Either the path1 or path2 parameter is an invalid address.
[EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt.
[EINVAL] The call attempted to create a link to a Guardian file (that is, a file in /G or in any
directory within /G).
[EIO] An input or output error occurred. The device holding the file might be in the
down state, or both processors that provide access to the device might have
failed.
4−16 Hewlett-Packard Company 527186-023