cchhddiirr() -- System Call (libc)

Change working directory
#iinncclluuddee <uunniissttdd.hh>
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 _w_o_r_k_i_n_g _d_i_r_e_c_t_o_r_y (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 `.'.  cchhddiirr() changes the
working directory to the directory  pointed to by _d_i_r_e_c_t_o_r_y. This change is
in effect until the program exits or calls cchhddiirr() again.

_S_e_e _A_l_s_o
ccdd, cchhmmoodd(), cchhrroooott(), ddiirreeccttoorryy, lliibbcc, uunniissttdd.hh
POSIX Standard, section 5.2.1

_D_i_a_g_n_o_s_t_i_c_s
cchhddiirr() returns  zero if successful.   It returns -1 if  an error occurred,
e.g.,  that  _d_i_r_e_c_t_o_r_y does  not  exist,  is not  a  directory,  or is  not
searchable.
