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

System Functions (r) rmdir(2)
[ENOTDIR] One of the following conditions exists:
A component of the directory pathname specified by the path parameter
is not a directory.
The final component of the path parameter is a symbolic link.
[ENOTEMPTY]
The directory specified by the path parameter is not empty.
[ENXIO] The fileset containing the client’s current working directory or root directory is
not mounted.
[EOSSNOTRUNNING]
A required OSS system process is not running.
[EPERM] One of the following conditions exist:
The calling process does not have appropriate privileges.
The program attempted an operation on a SEEP-protected fileset. Valid
for J06.15 and later J-series RVUs, and H06.26 and later H-series RVUs.
[EROFS] The directory specified by the path parameter resides on a read-only fileset.
RELATED INFORMATION
Functions: chmod(2), chroot(2), mkdir(2), mkfifo(3), mknod(2), remove(3), rename(2),
umask(2), unlink(2).
Commands: rmdir(1).
STANDARDS CONFORMANCE
The POSIX standards leave some features to the implementing vendor to define. The following
features are affected in the HP implementation:
The rmdir() function can be used to remove the root directory or the current working
directory of a process. The consequences of such an action are described under
DESCRIPTION.
The errno value [ENOTEMPTY] is returned instead of [EEXIST].
The following are HP extensions to the XPG4 Version 2 specification:
The errno values [EFAULT], [EFSBAD], [EINVAL], [ENOROOT], [ENOTEMPTY],
[ENXIO], and [EOSSNOTRUNNING] can be returned.
527186-023 Hewlett-Packard Company 655