Re: [lxc-devel] do pid1 and pid2 run in the same network namespace

2011-02-22 Thread Maheswara Reddy C - ERS, HCL Tech
Then it is quite easy. You just have to fork ten times the routine in the program I gave you in the previous email. Hi Daniel, But I want to run two different (fork() run same copy) process/threads in each namespace, that's why I am using clone() which take function pointer of each

Re: [lxc-devel] do pid1 and pid2 run in the same network namespace

2011-02-22 Thread Daniel Lezcano
On 02/22/2011 12:22 PM, Maheswara Reddy C - ERS, HCL Tech wrote: Then it is quite easy. You just have to fork ten times the routine in the program I gave you in the previous email. Hi Daniel, But I want to run two different (fork() run same copy) process/threads in each namespace, that's

Re: [lxc-devel] Two different (functionality) processes in same namespace

2011-02-22 Thread Greg Kurz
On 02/22/2011 12:47 PM, Maheswara Reddy C - ERS, HCL Tech wrote: Hi, Shall I program this way to create 10 namespaces, with each namespace run 2 different processes or any better way. #includesched.h #includestdio.h #includeunistd.h int main(int argc, char *argv[]) {

[lxc-devel] Anybody looked at unshare(2)?

2011-02-22 Thread Rob Landley
It looks like clone flags aren't the only way to create a new namespace, any existing process can move to a new namespace via unshare(2). This sounds like you could fairly easily make a super_chroot() function that does most of the container stuff. The hard part would be doing mount points,