Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chdir(2) — Interactive 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chroot(2)



          chdir(2)             INTERACTIVE UNIX System             chdir(2)



          NAME
               chdir - change working directory

          SYNOPSIS
               int chdir (path)
               char *path;

          DESCRIPTION
               path points to the path name of a directory.  chdir causes
               the named directory to become the current working directory,
               the starting point for path searches for path names not
               beginning with slash (/).

               chdir will fail and the current working directory will be
               unchanged if one or more of the following is true:

               [ENOTDIR]      A component of the path name is not a direc-
                              tory.

               [ENOENT]       The named directory does not exist.

               [EACCES]       Search permission is denied for any component
                              of the path name.

               [EFAULT]       path points outside the allocated address
                              space of the process.

               [EINTR]        A signal was caught during the chdir system
                              call.

               [ENOLINK]      path points to a remote machine and the link
                              to that machine is no longer active.

               [EMULTIHOP]    Components of path require hopping to multi-
                              ple remote machines.

               [ENAMETOOLONG] (POSIX Only)  The length of the path argument
                              exceeds {PATH_MAX}, or a path name component
                              is longer than {NAME_MAX} while
                              {_POSIX_NO_TRUNC} is in effect.

          SEE ALSO
               chroot(2).

          DIAGNOSTICS
               Upon successful completion, a value of 0 is returned.  Oth-
               erwise, a value of -1 is returned, and errno is set to indi-
               cate the error.







          Rev. 1.2                                                   Page 1



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