Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rmdir(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod

mkdir

mknod

rename

umask

rmdir

Purpose

     Removes a directory file.

Syntax

     rmdir (path)
     char *path;

Description

     The rmdir system call  removes the directory specified by
     the path parameter.  If Distributed Services is installed
     on your  system, this path  can cross into  another node.
     The directory  you specify  must be  empty, and  you must
     have write access to it.

Return Value

     Upon successful completion, the rmdir system call returns
     a value of 0.  If the rmdir system call fails, a value of
     -1 is returned, and errno is set to indicate the error.

Diagnostics

     The  rmdir system  call fails  and the  directory is  not
     deleted if one or more of the following are true:

     EBUSY      The directory  is in  use as either  the mount
                point for a file  system or the current direc-
                tory of the process that issued the rmdir.

     EEXIST     The directory is not empty.

     ENOTDIR    A component of the path is not a directory.

     ENOENT     The named file does not exist.

     EACCES     A component of the  path denies search permis-
                sion  or write  permission  is  denied on  the
                directory containing the link to be removed.

     EROFS      The  named file  resides on  a read-only  file
                system.

     EFAULT     path points outside of the process's allocated
                address space.

     ESTALE     The  process's root  or  current directory  is
                located in a virtual file system that has been
                unmounted.

     If  Distributed Services  is  installed  on your  system,
     rmdir can also  fail if one or more of  the following are
     true:

     EDIST         The   server   has  blocked   new   inbound
                   requests.

     EDIST         Outbound requests are currently blocked.

     EDIST         The server has a  release level of Distrib-
                   uted Services that  cannot communicate with
                   this node.

     EAGAIN        The  server  is  too  busy  to  accept  the
                   request.

     ESTALE        The file  descriptor for a remote  file has
                   become obsolete.

     EPERM         The translate tables of  the server did not
                   contain any entry  for either the effective
                   user  ID  or  effective  group  ID  of  the
                   calling process.

     ENODEV        The named file is  a remote file located on
                   a  device that  has been  unmounted at  the
                   server.

     ENOMEM        Either  this node  or the  server does  not
                   have enough memory available to service the
                   request.

     ENOCONNECT    An attempt to establish  a new network con-
                   nection with a remote node failed.

     EBADCONNECT   An attempt to use  an existing network con-
                   nection with a remote node failed.

Related Information

     In this book:  "chmod,"  "mkdir," "mknod,"  "rename," and
     "umask."

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026