770 lines
18 KiB
HTML
770 lines
18 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of UNSHARE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>UNSHARE</H1>
|
|
Section: Linux Programmer's Manual (2)<BR>Updated: 2019-03-06<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
unshare - disassociate parts of the process execution context
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<PRE>
|
|
<B>#define _GNU_SOURCE</B>
|
|
<B>#include <<A HREF="file:///usr/include/sched.h">sched.h</A>></B>
|
|
|
|
<B>int unshare(int </B><I>flags</I><B>);</B>
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>unshare</B>()
|
|
|
|
allows a process (or thread) to disassociate parts of its execution
|
|
context that are currently being shared with other processes (or threads).
|
|
Part of the execution context, such as the mount namespace, is shared
|
|
implicitly when a new process is created using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fork">fork</A></B>(2)
|
|
|
|
or
|
|
<B><A HREF="/cgi-bin/man/man2html?2+vfork">vfork</A></B>(2),
|
|
|
|
while other parts, such as virtual memory, may be
|
|
shared by explicit request when creating a process or thread using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2).
|
|
|
|
<P>
|
|
|
|
The main use of
|
|
<B>unshare</B>()
|
|
|
|
is to allow a process to control its
|
|
shared execution context without creating a new process.
|
|
<P>
|
|
|
|
The
|
|
<I>flags</I>
|
|
|
|
argument is a bit mask that specifies which parts of
|
|
the execution context should be unshared.
|
|
This argument is specified by ORing together zero or more
|
|
of the following constants:
|
|
<DL COMPACT>
|
|
<DT id="1"><B>CLONE_FILES</B>
|
|
|
|
<DD>
|
|
Reverse the effect of the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_FILES</B>
|
|
|
|
flag.
|
|
Unshare the file descriptor table, so that the calling process
|
|
no longer shares its file descriptors with any other process.
|
|
<DT id="2"><B>CLONE_FS</B>
|
|
|
|
<DD>
|
|
Reverse the effect of the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_FS</B>
|
|
|
|
flag.
|
|
Unshare filesystem attributes, so that the calling process
|
|
no longer shares its root directory
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+chroot">chroot</A></B>(2)),
|
|
|
|
current directory
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+chdir">chdir</A></B>(2)),
|
|
|
|
or umask
|
|
(<B><A HREF="/cgi-bin/man/man2html?2+umask">umask</A></B>(2))
|
|
|
|
attributes with any other process.
|
|
<DT id="3"><B>CLONE_NEWCGROUP</B> (since Linux 4.6)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWCGROUP</B>
|
|
|
|
flag.
|
|
Unshare the cgroup namespace.
|
|
Use of
|
|
<B>CLONE_NEWCGROUP</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
<DT id="4"><B>CLONE_NEWIPC</B> (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWIPC</B>
|
|
|
|
flag.
|
|
Unshare the IPC namespace,
|
|
so that the calling process has a private copy of the
|
|
IPC namespace which is not shared with any other process.
|
|
Specifying this flag automatically implies
|
|
<B>CLONE_SYSVSEM</B>
|
|
|
|
as well.
|
|
Use of
|
|
<B>CLONE_NEWIPC</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
<DT id="5"><B>CLONE_NEWNET</B> (since Linux 2.6.24)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWNET</B>
|
|
|
|
flag.
|
|
Unshare the network namespace,
|
|
so that the calling process is moved into a
|
|
new network namespace which is not shared
|
|
with any previously existing process.
|
|
Use of
|
|
<B>CLONE_NEWNET</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
<DT id="6"><B>CLONE_NEWNS</B>
|
|
|
|
<DD>
|
|
|
|
|
|
|
|
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWNS</B>
|
|
|
|
flag.
|
|
Unshare the mount namespace,
|
|
so that the calling process has a private copy of
|
|
its namespace which is not shared with any other process.
|
|
Specifying this flag automatically implies
|
|
<B>CLONE_FS</B>
|
|
|
|
as well.
|
|
Use of
|
|
<B>CLONE_NEWNS</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
For further information, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+mount_namespaces">mount_namespaces</A></B>(7).
|
|
|
|
<DT id="7"><B>CLONE_NEWPID</B> (since Linux 3.8)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
flag.
|
|
Unshare the PID namespace,
|
|
so that the calling process has a new PID namespace for its children
|
|
which is not shared with any previously existing process.
|
|
The calling process is
|
|
<I>not</I>
|
|
|
|
moved into the new namespace.
|
|
The first child created by the calling process will have
|
|
the process ID 1 and will assume the role of
|
|
<B><A HREF="/cgi-bin/man/man2html?1+init">init</A></B>(1)
|
|
|
|
in the new namespace.
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
automatically implies
|
|
<B>CLONE_THREAD</B>
|
|
|
|
as well.
|
|
Use of
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
For further information, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pid_namespaces">pid_namespaces</A></B>(7).
|
|
|
|
<DT id="8"><B>CLONE_NEWUSER</B> (since Linux 3.8)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
flag.
|
|
Unshare the user namespace,
|
|
so that the calling process is moved into a new user namespace
|
|
which is not shared with any previously existing process.
|
|
As with the child process created by
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
with the
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
flag, the caller obtains a full set of capabilities in the new namespace.
|
|
<DT id="9"><DD>
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
requires that the calling process is not threaded; specifying
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
automatically implies
|
|
<B>CLONE_THREAD</B>.
|
|
|
|
Since Linux 3.9,
|
|
|
|
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
also automatically implies
|
|
<B>CLONE_FS</B>.
|
|
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
requires that the user ID and group ID
|
|
of the calling process are mapped to user IDs and group IDs in the
|
|
user namespace of the calling process at the time of the call.
|
|
<DT id="10"><DD>
|
|
For further information on user namespaces, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7).
|
|
|
|
<DT id="11"><B>CLONE_NEWUTS</B> (since Linux 2.6.19)
|
|
|
|
<DD>
|
|
This flag has the same effect as the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_NEWUTS</B>
|
|
|
|
flag.
|
|
Unshare the UTS IPC namespace,
|
|
so that the calling process has a private copy of the
|
|
UTS namespace which is not shared with any other process.
|
|
Use of
|
|
<B>CLONE_NEWUTS</B>
|
|
|
|
requires the
|
|
<B>CAP_SYS_ADMIN</B>
|
|
|
|
capability.
|
|
<DT id="12"><B>CLONE_SYSVSEM</B> (since Linux 2.6.26)
|
|
|
|
<DD>
|
|
|
|
This flag reverses the effect of the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
<B>CLONE_SYSVSEM</B>
|
|
|
|
flag.
|
|
Unshare System V semaphore adjustment
|
|
(<I>semadj</I>)
|
|
|
|
values,
|
|
so that the calling process has a new empty
|
|
<I>semadj</I>
|
|
|
|
list that is not shared with any other process.
|
|
If this is the last process that has a reference to the process's current
|
|
<I>semadj</I>
|
|
|
|
list, then the adjustments in that list are applied
|
|
to the corresponding semaphores, as described in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+semop">semop</A></B>(2).
|
|
|
|
|
|
|
|
</DL>
|
|
<P>
|
|
|
|
In addition,
|
|
<B>CLONE_THREAD</B>,
|
|
|
|
<B>CLONE_SIGHAND</B>,
|
|
|
|
and
|
|
<B>CLONE_VM</B>
|
|
|
|
can be specified in
|
|
<I>flags</I>
|
|
|
|
if the caller is single threaded (i.e., it is not sharing
|
|
its address space with another process or thread).
|
|
In this case, these flags have no effect.
|
|
(Note also that specifying
|
|
<B>CLONE_THREAD</B>
|
|
|
|
automatically implies
|
|
<B>CLONE_VM</B>,
|
|
|
|
and specifying
|
|
<B>CLONE_VM</B>
|
|
|
|
automatically implies
|
|
<B>CLONE_SIGHAND</B>.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the process is multithreaded, then
|
|
the use of these flags results in an error.
|
|
|
|
<P>
|
|
|
|
If
|
|
<I>flags</I>
|
|
|
|
is specified as zero, then
|
|
<B>unshare</B>()
|
|
|
|
is a no-op;
|
|
no changes are made to the calling process's execution context.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
On success, zero returned.
|
|
On failure, -1 is returned and
|
|
<I>errno</I>
|
|
|
|
is set to indicate the error.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ERRORS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="13"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
An invalid bit was specified in
|
|
<I>flags</I>.
|
|
|
|
<DT id="14"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_THREAD</B>,
|
|
|
|
<B>CLONE_SIGHAND</B>,
|
|
|
|
or
|
|
<B>CLONE_VM</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
and the caller is multithreaded.
|
|
<DT id="15"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWIPC</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the kernel was not configured with the
|
|
<B>CONFIG_SYSVIPC</B>
|
|
|
|
and
|
|
<B>CONFIG_IPC_NS</B>
|
|
|
|
options.
|
|
<DT id="16"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWNET</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the kernel was not configured with the
|
|
<B>CONFIG_NET_NS</B>
|
|
|
|
option.
|
|
<DT id="17"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the kernel was not configured with the
|
|
<B>CONFIG_PID_NS</B>
|
|
|
|
option.
|
|
<DT id="18"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the kernel was not configured with the
|
|
<B>CONFIG_USER_NS</B>
|
|
|
|
option.
|
|
<DT id="19"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWUTS</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the kernel was not configured with the
|
|
<B>CONFIG_UTS_NS</B>
|
|
|
|
option.
|
|
<DT id="20"><B>EINVAL</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but the process has previously called
|
|
<B>unshare</B>()
|
|
|
|
with the
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
flag.
|
|
<DT id="21"><B>ENOMEM</B>
|
|
|
|
<DD>
|
|
Cannot allocate sufficient memory to copy parts of caller's
|
|
context that need to be unshared.
|
|
<DT id="22"><B>ENOSPC</B> (since Linux 3.7)
|
|
|
|
<DD>
|
|
|
|
<B>CLONE_NEWPID</B>
|
|
|
|
was specified in flags,
|
|
but the limit on the nesting depth of PID namespaces
|
|
would have been exceeded; see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+pid_namespaces">pid_namespaces</A></B>(7).
|
|
|
|
<DT id="23"><B>ENOSPC</B> (since Linux 4.9; beforehand <B>EUSERS</B>)
|
|
|
|
<DD>
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
and the call would cause the limit on the number of
|
|
nested user namespaces to be exceeded.
|
|
See
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7).
|
|
|
|
<DT id="24"><DD>
|
|
From Linux 3.11 to Linux 4.8, the error diagnosed in this case was
|
|
<B>EUSERS</B>.
|
|
|
|
<DT id="25"><B>ENOSPC</B> (since Linux 4.9)
|
|
|
|
<DD>
|
|
One of the values in
|
|
<I>flags</I>
|
|
|
|
specified the creation of a new user namespace,
|
|
but doing so would have caused the limit defined by the corresponding file in
|
|
<I>/proc/sys/user</I>
|
|
|
|
to be exceeded.
|
|
For further details, see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7).
|
|
|
|
<DT id="26"><B>EPERM</B>
|
|
|
|
<DD>
|
|
The calling process did not have the required privileges for this operation.
|
|
<DT id="27"><B>EPERM</B>
|
|
|
|
<DD>
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
but either the effective user ID or the effective group ID of the caller
|
|
does not have a mapping in the parent namespace (see
|
|
<B><A HREF="/cgi-bin/man/man2html?7+user_namespaces">user_namespaces</A></B>(7)).
|
|
|
|
<DT id="28"><B>EPERM</B> (since Linux 3.9)
|
|
|
|
<DD>
|
|
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
was specified in
|
|
<I>flags</I>
|
|
|
|
and the caller is in a chroot environment
|
|
|
|
(i.e., the caller's root directory does not match the root directory
|
|
of the mount namespace in which it resides).
|
|
<DT id="29"><B>EUSERS</B> (from Linux 3.11 to Linux 4.8)
|
|
|
|
<DD>
|
|
<B>CLONE_NEWUSER</B>
|
|
|
|
was specified in
|
|
<I>flags</I>,
|
|
|
|
and the limit on the number of nested user namespaces would be exceeded.
|
|
See the discussion of the
|
|
<B>ENOSPC</B>
|
|
|
|
error above.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>VERSIONS</H2>
|
|
|
|
The
|
|
<B>unshare</B>()
|
|
|
|
system call was added to Linux in kernel 2.6.16.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>CONFORMING TO</H2>
|
|
|
|
The
|
|
<B>unshare</B>()
|
|
|
|
system call is Linux-specific.
|
|
<A NAME="lbAI"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
Not all of the process attributes that can be shared when
|
|
a new process is created using
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2)
|
|
|
|
can be unshared using
|
|
<B>unshare</B>().
|
|
|
|
In particular, as at kernel 3.8,
|
|
|
|
<B>unshare</B>()
|
|
|
|
does not implement flags that reverse the effects of
|
|
<B>CLONE_SIGHAND</B>,
|
|
|
|
|
|
|
|
|
|
|
|
<B>CLONE_THREAD</B>,
|
|
|
|
or
|
|
<B>CLONE_VM</B>.
|
|
|
|
|
|
|
|
|
|
|
|
Such functionality may be added in the future, if required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>EXAMPLE</H2>
|
|
|
|
The program below provides a simple implementation of the
|
|
<B><A HREF="/cgi-bin/man/man2html?1+unshare">unshare</A></B>(1)
|
|
|
|
command, which unshares one or more namespaces and executes the
|
|
command supplied in its command-line arguments.
|
|
Here's an example of the use of this program,
|
|
running a shell in a new mount namespace,
|
|
and verifying that the original shell and the
|
|
new shell are in separate mount namespaces:
|
|
<P>
|
|
|
|
|
|
|
|
$ <B>readlink /proc/$$/ns/mnt</B>
|
|
mnt:[4026531840]
|
|
$ <B>sudo ./unshare -m /bin/bash</B>
|
|
# <B>readlink /proc/$$/ns/mnt</B>
|
|
mnt:[4026532325]
|
|
|
|
|
|
<P>
|
|
|
|
The differing output of the two
|
|
<B><A HREF="/cgi-bin/man/man2html?1+readlink">readlink</A></B>(1)
|
|
|
|
commands shows that the two shells are in different mount namespaces.
|
|
<A NAME="lbAK"> </A>
|
|
<H3>Program source</H3>
|
|
|
|
|
|
|
|
/* unshare.c
|
|
<P>
|
|
<BR> A simple implementation of the <A HREF="/cgi-bin/man/man2html?1+unshare">unshare</A>(1) command: unshare
|
|
<BR> namespaces and execute a command.
|
|
*/
|
|
#define _GNU_SOURCE
|
|
#include <<A HREF="file:///usr/include/sched.h">sched.h</A>>
|
|
#include <<A HREF="file:///usr/include/unistd.h">unistd.h</A>>
|
|
#include <<A HREF="file:///usr/include/stdlib.h">stdlib.h</A>>
|
|
#include <<A HREF="file:///usr/include/stdio.h">stdio.h</A>>
|
|
<P>
|
|
/* A simple error-handling function: print an error message based
|
|
<BR> on the value in 'errno' and terminate the calling process */
|
|
<P>
|
|
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \
|
|
<BR> } while (0)
|
|
<P>
|
|
static void
|
|
usage(char *pname)
|
|
{
|
|
<BR> fprintf(stderr, "Usage: %s [options] program [arg...]\n", pname);
|
|
<BR> fprintf(stderr, "Options can be:\n");
|
|
<BR> fprintf(stderr, " -i unshare IPC namespace\n");
|
|
<BR> fprintf(stderr, " -m unshare mount namespace\n");
|
|
<BR> fprintf(stderr, " -n unshare network namespace\n");
|
|
<BR> fprintf(stderr, " -p unshare PID namespace\n");
|
|
<BR> fprintf(stderr, " -u unshare UTS namespace\n");
|
|
<BR> fprintf(stderr, " -U unshare user namespace\n");
|
|
<BR> exit(EXIT_FAILURE);
|
|
}
|
|
<P>
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
<BR> int flags, opt;
|
|
<P>
|
|
<BR> flags = 0;
|
|
<P>
|
|
<BR> while ((opt = getopt(argc, argv, "imnpuU")) != -1) {
|
|
<BR> switch (opt) {
|
|
<BR> case 'i': flags |= CLONE_NEWIPC; break;
|
|
<BR> case 'm': flags |= CLONE_NEWNS; break;
|
|
<BR> case 'n': flags |= CLONE_NEWNET; break;
|
|
<BR> case 'p': flags |= CLONE_NEWPID; break;
|
|
<BR> case 'u': flags |= CLONE_NEWUTS; break;
|
|
<BR> case 'U': flags |= CLONE_NEWUSER; break;
|
|
<BR> default: usage(argv[0]);
|
|
<BR> }
|
|
<BR> }
|
|
<P>
|
|
<BR> if (optind >= argc)
|
|
<BR> usage(argv[0]);
|
|
<P>
|
|
<BR> if (unshare(flags) == -1)
|
|
<BR> errExit("unshare");
|
|
<P>
|
|
<BR> execvp(argv[optind], &argv[optind]);
|
|
<BR> errExit("execvp");
|
|
}
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+unshare">unshare</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+clone">clone</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+fork">fork</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+kcmp">kcmp</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+setns">setns</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+vfork">vfork</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+namespaces">namespaces</A></B>(7)
|
|
|
|
<P>
|
|
|
|
<I>Documentation/userspace-api/unshare.rst</I>
|
|
|
|
in the Linux kernel source tree
|
|
|
|
(or
|
|
<I>Documentation/unshare.txt</I>
|
|
|
|
before Linux 4.12)
|
|
<A NAME="lbAM"> </A>
|
|
<H2>COLOPHON</H2>
|
|
|
|
This page is part of release 5.05 of the Linux
|
|
<I>man-pages</I>
|
|
|
|
project.
|
|
A description of the project,
|
|
information about reporting bugs,
|
|
and the latest version of this page,
|
|
can be found at
|
|
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="30"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="31"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="32"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="33"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="34"><A HREF="#lbAF">ERRORS</A><DD>
|
|
<DT id="35"><A HREF="#lbAG">VERSIONS</A><DD>
|
|
<DT id="36"><A HREF="#lbAH">CONFORMING TO</A><DD>
|
|
<DT id="37"><A HREF="#lbAI">NOTES</A><DD>
|
|
<DT id="38"><A HREF="#lbAJ">EXAMPLE</A><DD>
|
|
<DL>
|
|
<DT id="39"><A HREF="#lbAK">Program source</A><DD>
|
|
</DL>
|
|
<DT id="40"><A HREF="#lbAL">SEE ALSO</A><DD>
|
|
<DT id="41"><A HREF="#lbAM">COLOPHON</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:35 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|