📄 syscalls_8.html
字号:
<!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - chroot</TITLE>
<P>Go to the <A HREF="syscalls_7.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_7.html">previous</A>, <A HREF="syscalls_9.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_9.html">next</A> section.<P>
<H2><A NAME="SEC8" HREF="syscalls_toc.html#SEC8" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC8">chroot</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int chroot(const char *<VAR>path</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>path</VAR>: [in] points to the new root.
<P>
<H3>DESCRIPTION</H3>
<P>
Changes the root directory for the current task and all its children to
the path specified by <VAR>path</VAR>. This operation is privilegied and only
the superuser can invoke it successfully.
<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>
<UL>
<LI><CODE>EPERM</CODE>: the effective uid of the task is not equal the the
uid of the file and the task does not have superuser privileges.
<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>
<P>Go to the <A HREF="syscalls_7.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_7.html">previous</A>, <A HREF="syscalls_9.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_9.html">next</A> section.<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -