Re: [PATCH] sys-tools: Add setns utility to sys-tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux