Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chdir(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chroot

cd

     chdir

Purpose

     Changes the current directory.

Syntax

     int chdir (path)
     char *path;

Description

     The chdir  system call  changes the current  directory to
     the directory  specified by the path  parameter.  If Dis-
     tributed Services is installed  on your system, this path
     can cross into another node.  The current directory, also
     called  the current  working directory,  is the  starting
     point of searches for path names that do not begin with a
     "/" (slash).

Return Value

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

Diagnostics

     The  chdir system  call fails  and the  current directory
     remains unchanged  if one  or more  of the  following are
     true:

     ENOTDIR    A  component of  the path  parameter is  not a
                directory.

     ENOENT     The named directory does not exist.

     EACCES     Search permission is  denied for any component
                of the path parameter.

     EFAULT     The path parameter &pointsout..

     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,
     chdir 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:  "chroot."

     The  cd   command  in   AIX  Operating   System  Commands
     Reference.

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