[systemd-devel] Question about nspawn.c

Lennart Poettering lennart at poettering.net
Wed Aug 24 05:45:35 PDT 2011


On Wed, 24.08.11 14:38, Stef Bon (stefbon at gmail.com) wrote:

> 
> Please let me explain why I think this is strange to me:
> 
> in line 713 there is a call to clone, so here the cloned child process
> has it's own namespace.
> 
> in line 759 all the submount like proc, dev and sys are done on the
> directory to change to.
> 
> in line 775 the mount is done were talking about, using arg_directory
> 
> A bind mount I can understand, but a move?? Moving the root to
> arg_directory will overwrite the just
> created mounts done in line 759?

No, it's the other way round. We move arg_directory to /, so that it
becomes our new root directory of the namespace.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list