Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chdir(2) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cd(1)

chroot(2)

chdir(2)

NAME

chdir − change default directory

SYNTAX

int chdir(dirname)
char *dirname;

DESCRIPTION

The chdir system call causes dirname to become the current working directory, that is, the starting point for path names not beginning with “/”.  The named dirname is the null-byte terminated address of the pathname of a directory. 

RETURN VALUE

If unsuccessful, returns a −1, and the global variable errno indicates the error code. 

DIAGNOSTICS

The chdir call will fail if:

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

[EFAULT] The named dirname points outside the process’s allocated address space. 

[ENFILE] There is insufficient system space to contain the inode. 

[ENOENT] Either the named directory or an element within the named path does not exist. 

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

ASSEMBLER

(chdir = 12.) 
sys chdir; dirname

SEE ALSO

cd(1), chroot(2)

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