home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / man / cat2 / chdir.0 < prev    next >
Text File  |  1993-12-07  |  3KB  |  133 lines

  1.  
  2. CHDIR(2)                   UNIX Programmer's Manual                   CHDIR(2)
  3.  
  4. NNAAMMEE
  5.      cchhddiirr, ffcchhddiirr - change current working directory
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<uunniissttdd..hh>>
  9.  
  10.      _i_n_t
  11.      cchhddiirr(_c_o_n_s_t _c_h_a_r _*_p_a_t_h)
  12.  
  13.      _i_n_t
  14.      ffcchhddiirr(_i_n_t _f_d)
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The _p_a_t_h arument points to the pathname of a directory.  The cchhddiirr()
  18.      function causes the named directory to become the current working direc­
  19.      tory, that is, the starting point for path searches of pathnames not be­
  20.      ginning with a slash, `/'.
  21.  
  22.      The ffcchhddiirr() function causes the directory referenced by _f_d to become the
  23.      current working directory, the starting point for path searches of path­
  24.      names not beginning with a slash, `/'.
  25.  
  26.      In order for a directory to become the current directory, a process must
  27.      have execute (search) access to the directory.
  28.  
  29. RREETTUURRNN VVAALLUUEESS
  30.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  31.      of ­1 is returned and _e_r_r_n_o is set to indicate the error.
  32.  
  33. EERRRROORRSS
  34.      CChhddiirr() will fail and the current working directory will be unchanged if
  35.      one or more of the following are true:
  36.  
  37.      [ENOTDIR]     A component of the path prefix is not a directory.
  38.  
  39.      [EINVAL]      The pathname contains a character with the high­order bit
  40.                    set.
  41.  
  42.      [ENAMETOOLONG]
  43.                    A component of a pathname exceeded 255 characters, or an
  44.                    entire path name exceeded 1023 characters.
  45.  
  46.      [ENOENT]      The named directory does not exist.
  47.  
  48.      [ELOOP]       Too many symbolic links were encountered in translating the
  49.                    pathname.
  50.  
  51.      [EACCES]      Search permission is denied for any component of the path
  52.                    name.
  53.  
  54.      [EFAULT]      _P_a_t_h points outside the process's allocated address space.
  55.  
  56.      [EIO]         An I/O error occurred while reading from or writing to the
  57.                    file system.
  58.  
  59.      FFcchhddiirr() will fail and the current working directory will be unchanged if
  60.      one or more of the following are true:
  61.  
  62.      [EACCES]      Search permission is denied for the directory referenced by
  63.                    the file descriptor.
  64.  
  65.  
  66.      [ENOTDIR]     The file descriptor does not reference a directory.
  67.  
  68.      [EBADF]       The argument _f_d is not a valid file descriptor.
  69.  
  70. SSEEEE AALLSSOO
  71.      chroot(2)
  72.  
  73. SSTTAANNDDAARRDDSS
  74.      CChhddiirr() is expected to conform to IEEE Std 1003.1­1988 (``POSIX'').
  75.  
  76. HHIISSTTOORRYY
  77.      The ffcchhddiirr() function call appeared in 4.2BSD.
  78.  
  79. 4th Berkeley Distribution       March 10, 1991                               2
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.