Open System Services System Calls Reference Manual (G06.25+, H06.03+)
access(2) OSS System Calls Reference Manual
Use From the Guardian Environment
The access() 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.
RETURN VALUES
Upon successful completion, the access() function returns the value 0 (zero). Otherwise, the
value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the access() function sets errno to the corresponding
value:
[EACCES] The permission bits of the file mode do not permit the requested access, or search
permission is denied on a component of the pathname prefix. The owner of a file
has permissions checked with respect to the "owner" read, write, and execute
mode bits; members of the file’s group other than the owner have permissions
checked with respect to the "group" mode bits; and all others have permissions
checked with respect to the "other" mode bits.
[EFAULT] The path parameter points outside the process’s allocated address space.
[EFSBAD] The program attempted an operation involving a fileset with a corrupted fileset
catalog.
[EINTR] A signal was caught during execution of the function call.
[EINVAL] The access_mode parameter contains an invalid bit pattern.
[EIO] An I/O error occurred during a read from or a write to the fileset.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[ENAMETOOLONG]
One of the following is too long:
• The pathname pointed to by the path parameter
• A component of the pathname pointed to by the path parameter
• The intermediate result of pathname resolution when a symbolic link is
part of the path parameter
The pathconf( ) function can be called to obtain the applicable limits.
1−6 Hewlett-Packard Company 527186-003