lkml.org 
[lkml]   [2004]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: namespaces (was Re: [Q] don't allow tmpfs to page out)
On Thu, Jul 15, 2004 at 01:31:08PM +0100, Paul Jakma wrote:

> speaking of which, how does one use namespaces exactly? The kernel
> appears to maintain mount information per process, but how do you set
> this up?
>
> neither 'man mount/namespace' nor 'appropos namespace' show up
> anything.

Try "man 2 clone" and look for CLONE_NEWNS.

Somewhere else I wrote

Since 2.4.19/2.5.2, the clone() system call, a generalization of
Unix fork() and BSD vfork(), may have the CLONE_NEWNS flag, that
says that all mount information must be copied. Afterwards, mount,
chroot, pivotroot and similar namespace changing calls done by this
new process do influence this process and its children, but not other
processes. In particular, the virtual file /proc/mounts that lists the
mounted filesystems, is now a symlink to /proc/self/mounts - different
processes may live in entirely different file hierarchies.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site