01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHDffi ( 2 ) CHDffi ( 2 )<br />

NAME<br />

chdir - change working directory<br />

SYNOPSIS<br />

int chdir (path)<br />

char *path;<br />

DESCRIPTION<br />

Path points to the path name of a directory. Chdir causes the<br />

named directory to become the current working directory, the<br />

starting point for path searches for path names not beginning with<br />

f.<br />

Chdir will fail and the current working directory will be<br />

unchanged if one or more of the following are true:<br />

A component of the path name is not a directory.<br />

[ENOTDffij<br />

The named directory does not exist. [ENOENTI<br />

Search permission is denied for any component of the path<br />

name. [EACCESI<br />

Path points outside the process's allocated address space.<br />

[EFAULTI<br />

RETURN VALUE<br />

Upon successful completion, a value of 0 is returned. Otherwise, a<br />

value of -1 is returned and errno is set to indicate the error.<br />

SEE ALSO<br />

chroot(2).<br />

- 1-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!