Query: chdir
OS: v7
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
CHDIR(2) System Calls Manual CHDIR(2)NAMEchdir, chroot - change default directorySYNOPSISchdir(dirname) char *dirname; chroot(dirname) char *dirname;DESCRIPTIONDirname is the address of the pathname of a directory, terminated by a null byte. Chdir causes this directory to become the current work- ing directory, the starting point for path names not beginning with `/'. Chroot sets the root directory, the starting point for path names beginning with `/'. The call is restricted to the super-user.SEE ALSOcd(1)DIAGNOSTICSZero is returned if the directory is changed; -1 is returned if the given name is not that of a directory or is not searchable.ASSEMBLER(chdir = 12.) sys chdir; dirname (chroot = 61.) sys chroot; dirname CHDIR(2)