LWN.net Logo

Namespaces in operation, part 4: more on PID namespaces

Namespaces in operation, part 4: more on PID namespaces

Posted Jan 23, 2013 19:09 UTC (Wed) by luto (subscriber, #39314)
Parent article: Namespaces in operation, part 4: more on PID namespaces

I wrote a little tool awhile ago to play with this stuff. It's here:

http://web.mit.edu/luto/www/linux/nnp/newns.c

Have fun! If any of you find it useful, let me know -- I can probably polish it a bit and send it to util-linux or something.

Also, on very new kernels (3.8+), a lot of this stuff can be done without privilege if you're willing to accept a few restrictions.


(Log in to post comments)

Namespaces in operation, part 4: more on PID namespaces

Posted Jan 24, 2013 16:56 UTC (Thu) by dashesy (subscriber, #74652) [Link]

Integrating these nice utilities in the util-linux is an excellent idea. A few different simple utilities, along with some simple SysV-init scripts (that go in /etc/init.d of ns for convenience) and a generic init suitable for namespace(polished simple_init.c) is all needed to experiment with ns.

Namespaces in operation, part 4: more on PID namespaces

Posted Jan 25, 2013 16:44 UTC (Fri) by fishface60 (subscriber, #88700) [Link]

Util-Linux already has such tools in git, unshare works with all the name spaces and nsenter let's you create a new process in an existing namespace.

I'm quite looking forward to being able to launch a container in shell.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds