V7/usr/man/man2/chdir.2
.TH "CHDIR" 2
.SH NAME
chdir, chroot \- change default directory
.SH SYNOPSIS
.B chdir(dirname)
.br
.B char *dirname;
.PP
.B chroot(dirname)
.br
.B char *dirname;
.SH DESCRIPTION
.I Dirname
is the address of the pathname of a directory, terminated by a null byte.
.I Chdir
causes this directory
to become the current working directory,
the starting point for path names not beginning with `/'.
.PP
.I Chroot
sets the root directory, the
starting point for path names beginning with `/'.
The call is restricted to the super-user.
.SH "SEE ALSO"
cd(1)
.SH DIAGNOSTICS
Zero is returned if the directory is changed; \-1
is returned
if the given name is not that of a directory
or is not searchable.
.SH ASSEMBLER
(chdir = 12.)
.br
.B sys chdir; dirname
.PP
(chroot = 61.)
.br
.B sys chroot; dirname