Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (r) rmdir(2)
Use From the Guardian Environment
The rmdir() 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 rmdir() function returns the value 0 (zero). If the rmdir()
function fails, the value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the rmdir() function sets errno to the corresponding
value:
[EACCES] One of the following conditions exists:
• Search permission is denied on a component of the directory pathname
specified by the path parameter.
• Write permission is denied on the parent directory of the directory to be
removed.
• The S_ISVTX flag is set on the directory containing the directory
referred to by the path parameter. However, the calling process is not
any of the following:
— The parent directory owner
— The directory owner
— A process with appropriate privileges
[EBUSY] One of the following conditions exists:
• The directory specified by the path parameter is in use as the mount
point for a fileset.
• The directory specified by the path parameter is /E or /G (the Guardian
file system) or a disk volume or process within /G (has an OSS pathname
of the form /G/vol or /G/process).
• The directory specified by the path parameter is the lost+found directory
in the root directory for a fileset.
[EFAULT] The path parameter is an invalid address.
527186-003 Hewlett-Packard Company 6−33