Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chdir(2) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chroot(2)

CHDIR(2)  —  Silicon Graphics

NAME

chdir − change working directory

SYNOPSIS

int chdir (path)
char ∗path;

DESCRIPTION

Path points to the path name of a directory.  Chdir causes the named directory to become the current working directory, the starting point for path searches for path names not beginning with /. 

Chdir will fail and the current working directory will be unchanged if one or more of the following are true:

A component of the path name is not a directory.  ­[ENOTDIR]

The named directory does not exist.  ­[ENOENT]

Search permission is denied for any component of the path name.  ­[EACCES]

Path points outside the process’s allocated address space.  ­[EFAULT]

RETURN VALUE

Upon successful completion, a value of 0 is returned.  Otherwise, a value of −1 is returned and errno is set to indicate the error. 

SEE ALSO

chroot(2). 

ASSEMBLER

moveq#12,D0
movlpath,A0
trap#0

Carry bit set on failure and cleared on success. 

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026