

chdir()                COHERENT System Call               chdir()




Change working directory

cchhddiirr(_d_i_r_e_c_t_o_r_y) cchhaarr *_d_i_r_e_c_t_o_r_y;

The  working directory  (or _c_u_r_r_e_n_t  _d_i_r_e_c_t_o_r_y) is  the directory
from which the search for a  file name begins if a path name does
not begin with `/'.  By convention, the working directory has the
name `.'.   chdir changes the working  directory to the directory
pointed  to by  directory.  This  change is  in effect  until the
program exits or calls cchhddiirr again.

***** See Also *****

cd, chmod(), chroot(), COHERENT system calls, directory

***** Diagnostics *****

chdir returns zero if successful.   It returns -1 if an error oc-
curred, e.g., that directory  does not exist, is not a directory,
or is not searchable.




































COHERENT Lexicon                                           Page 1


