From: "Mantas M." <grawity@gmail.com>
To: util-linux@vger.kernel.org
Subject: Re: [PATCH] sys-tools: Add setns utility to sys-tools
Date: Wed, 19 Dec 2012 22:16:10 +0200 [thread overview]
Message-ID: <kat7a9$6pv$1@ger.gmane.org> (raw)
In-Reply-To: <1355944006-27234-1-git-send-email-nhorman@tuxdriver.com>
On 2012-12-19 21:06, Neil Horman wrote:
> ...
> +.BR \-u\ <pid> , " \-\-uts=<pid>"
> +Migrate to the uts namespace of <pid>
> +.TP
> +.BR \-i\ <pid> , " \-\-ipc=<pid>"
> +Migrate to the ipc namespace of <pid>
> +.TP
> +.BR \-n\ <pid> , " \-\-net\<pid>"
> +Migrate to the net namespace of <pid>
Wouldn't it be more useful to accept an arbitrary path, and just hand it
to setns(2)? That way, the utility would automatically gain support for
new namespace types (for example `setns /proc/$pid/ns/mount`), and would
allow joining namespaces that are linked outside /proc.
For example, I seem to remember someone saying that `mount --bind
/proc/$pid/ns/net /tmp/foo-namespace` can be used to make that
particular namespace persist even after the process quits. Then `setns
/tmp/foo-namespace someprogram` could be used to join that namespace again.
--
Mantas Mikulėnas <grawity@gmail.com>
next prev parent reply other threads:[~2012-12-19 20:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 19:06 [PATCH] sys-tools: Add setns utility to sys-tools Neil Horman
2012-12-19 20:16 ` Mantas M. [this message]
2012-12-19 21:01 ` Neil Horman
2012-12-19 23:15 ` Sami Kerola
2012-12-20 9:24 ` Karel Zak
2012-12-20 11:17 ` Sami Kerola
2012-12-20 15:34 ` Neil Horman
2012-12-20 18:22 ` [PATCH v2] sys-tools: Enhance unshare command to support the switching of namespaces Neil Horman
2012-12-28 12:54 ` Ángel González
2012-12-28 16:12 ` Neil Horman
2012-12-28 19:33 ` Ángel González
2012-12-28 21:26 ` Neil Horman
2012-12-28 16:22 ` [PATCH v3] " Neil Horman
2013-01-02 21:33 ` Neil Horman
2013-01-07 14:05 ` Karel Zak
2013-01-07 14:58 ` Neil Horman
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='kat7a9$6pv$1@ger.gmane.org' \
--to=grawity@gmail.com \
--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