Re: [lxc-devel] Two process on a same namespcae with clone()

2011-02-17 Thread Rob Landley
On 02/17/2011 03:55 AM, Maheswara Reddy C - ERS, HCL Tech wrote: > Thanks Rob, > > Here ABC_stack or XYZ_stack mean different vendor networking stack, Good to know. > these two network stack want to run in one namespace as tow different process. In one _what_ namespace? Ok, imagine I'm a bart

Re: [lxc-devel] Two process on a same namespcae with clone()

2011-02-17 Thread Maheswara Reddy C - ERS, HCL Tech
to:rland...@parallels.com] Sent: Thursday, February 17, 2011 3:03 PM To: Maheswara Reddy C - ERS, HCL Tech Cc: lxc-devel@lists.sourceforge.net Subject: Re: [lxc-devel] Two process on a same namespcae with clone() On 02/17/2011 12:48 AM, Maheswara Reddy C - ERS, HCL Tech wrote: > Hi, > > Fine,fork()

Re: [lxc-devel] Two process on a same namespcae with clone()

2011-02-17 Thread Rob Landley
On 02/17/2011 12:48 AM, Maheswara Reddy C - ERS, HCL Tech wrote: > Hi, > > Fine,fork() always create new process, but here both the processes are > different stacks. Different processes have different stacks, yes. Even if you use pthread_create() each thread still has its own stack. That's not

Re: [lxc-devel] Two process on a same namespcae with clone()

2011-02-16 Thread Maheswara Reddy C - ERS, HCL Tech
Subject: Re: [lxc-devel] Two process on a same namespcae with clone() On 02/16/2011 01:25 AM, Maheswara Reddy C - ERS, HCL Tech wrote: > Hi, > > Could someone help me out, > > I want to run the two process on same name space, shall it possible > using the clone() You call clon

Re: [lxc-devel] Two process on a same namespcae with clone()

2011-02-16 Thread Rob Landley
On 02/16/2011 01:25 AM, Maheswara Reddy C - ERS, HCL Tech wrote: > Hi, > > Could someone help me out, > > I want to run the two process on same name space, shall it possible > using the clone() You call clone with the CLONE_NEW* flags to create a new namespace. And then you just fork() normall

[lxc-devel] Two process on a same namespcae with clone()

2011-02-16 Thread Maheswara Reddy C - ERS, HCL Tech
Hi, Could someone help me out, I want to run the two process on same name space, shall it possible using the clone() 1. Calling Clone() inside clone() without setting CLONE_NS clone(do_clone1, stack1,CLONE_NEWNS ,&clone_arg); --> process 1 on name space 1