Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (a - d) chdir(2)
Use From the Guardian Environment
The chdir( ) 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.
NOTES
A process running with an effective user ID or group afliation that qualifies for membership in
the Safeguard SECURITY-OSS-ADMINISTRATOR group has read and search permissions for
any OSS directory.
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 chdir() function returns the value 0 (zero). Otherwise, the
value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the chdir( ) function sets errno to the corresponding value:
[EACCES] The requested current working directory is not accessible because search permis-
sion is denied for a component of the pathname.
[EFAULT] The path parameter is an invalid address.
[EFSBAD] The fileset catalog for one of the filesets involved in the operation is corrupt.
[EIO] A physical input or output error occurred.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[ENAMETOOLONG]
One of these 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.
[ENOENT] One of these conditions exists:
The named directory does not exist.
The specified pathname is an empty string.
527186-023 Hewlett-Packard Company 119