util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Karel Zak <kzak@redhat.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>,
	util-linux@vger.kernel.org,
	Mikhail Gusarov <dottedmag@dottedmag.net>
Subject: Re: [PATCH 2/2] unshare: allow persisting namespaces
Date: Tue, 06 Jan 2015 11:11:49 -0600	[thread overview]
Message-ID: <87y4pfomui.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <20150106130343.GG18528@x2.net.home> (Karel Zak's message of "Tue, 6 Jan 2015 14:03:43 +0100")

Karel Zak <kzak@redhat.com> writes:

> On Sun, Dec 28, 2014 at 09:23:38PM +0100, Lubomir Rintel wrote:
>> Bind mount the namespace file to a given location after creating it if
>> requested (analogously to what "ip netns" and other tools do). This makes
>> it possible for a namespace to survive with no processes running while
>> processes can enter it with nsenter(1):
>> 
>>   # unshare --uts=utsns hostname behemoth
>>   # nsenter --uts=utsns hostname
>>   behemoth
>
> Nice, especially when we already supports the same concept in nsenter.
>
> But I guess that "empty namespace" (without any running process) is
> impossible for PID namespaces, right? It would be nice to add a note
> about it to the man page.

No.  An empty pid namespace is valid.   An empty pid namespace is one
in which an init process has not entered the pid namespace, or one in
which the init process has exited (and thus no more processes are
allowed).

So an empty pid namespace is a little weird but valid.

The implementation details of the patch completely baffle me.  I can't
see a reason for things being implemented with clone for example.

Eric

  reply	other threads:[~2015-01-06 17:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-28 20:23 [PATCH 1/2] unshare: add some examples Lubomir Rintel
2014-12-28 20:23 ` [PATCH 2/2] unshare: allow persisting namespaces Lubomir Rintel
2015-01-06 13:03   ` Karel Zak
2015-01-06 17:11     ` Eric W. Biederman [this message]
2015-01-06 17:21       ` Karel Zak
2015-01-06 17:44         ` Eric W. Biederman
2015-02-15 12:10   ` Mike Frysinger
2015-01-12 11:41 ` [PATCH 1/2] unshare: add some examples Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4pfomui.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=dottedmag@dottedmag.net \
    --cc=kzak@redhat.com \
    --cc=lkundrak@v3.sk \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).