44 lines
1.7 KiB
HTML
44 lines
1.7 KiB
HTML
<html><!-- This HTML file has been created by texi2html 1.29
|
|
from syscalls.texi on 4 June 1994 -->
|
|
|
|
<TITLE>Syscall specifications of Linux - chdir</TITLE>
|
|
<P>Go to the <A HREF="syscalls_4.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_4.html">previous</A>, <A HREF="syscalls_6.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_6.html">next</A> section.<P>
|
|
<H2><A NAME="SEC5" HREF="syscalls_toc.html#SEC5" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC5">chdir and fchdir</A></H2>
|
|
<P>
|
|
<H3>SYNOPSIS</H3>
|
|
<P>
|
|
<CODE>int chdir(const char *<VAR>path</VAR>);</CODE>
|
|
<P>
|
|
<CODE>int fchdir(int <VAR>fd</VAR>);</CODE>
|
|
<P>
|
|
<H3>PARAMETERS</H3>
|
|
<P>
|
|
<VAR>path</VAR>: [in] a pointer to the new current directory.
|
|
<P>
|
|
<VAR>fd</VAR>: [in] the file descriptor of the new directory.
|
|
<P>
|
|
<H3>DESCRIPTION</H3>
|
|
<P>
|
|
<CODE>chdir</CODE> changes the current directory to <VAR>path</VAR> and
|
|
<CODE>fchdir</CODE> to <VAR>fd</VAR>.
|
|
<P>
|
|
<H3>RETURN VALUE</H3>
|
|
<P>
|
|
On success zero is returned. On error, -1 is returned and <CODE>errno</CODE> is
|
|
set to one of the following values:
|
|
<P>
|
|
for <CODE>chdir</CODE>:
|
|
<P>
|
|
<UL>
|
|
<LI><CODE>ENOTDIR</CODE>, <CODE>EACCESS</CODE>, <CODE>EFAULT</CODE>, <CODE>ENOENT</CODE>,
|
|
<CODE>ENOMEM</CODE> <CODE>ENAMETOOLONG</CODE>, <CODE>EROFS</CODE> or <CODE>ELOOP</CODE>.
|
|
</UL>
|
|
<P>
|
|
for <CODE>fchdir</CODE>:
|
|
<P>
|
|
<UL>
|
|
<LI><CODE>EBADF</CODE>, <CODE>ENOENT</CODE>, <CODE>ENOTDIR</CODE> or <CODE>EACCESS</CODE>.
|
|
</UL>
|
|
<P>
|
|
<P>Go to the <A HREF="syscalls_4.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_4.html">previous</A>, <A HREF="syscalls_6.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_6.html">next</A> section.<P>
|