Re: [9fans] Namespace inheritance between processes

2016-05-22 Thread erik quanstrom
> > Also, a totally random question: It seems like poor ergonomics that > > one must create empty directories in order to serve as mount points. > > Why not just allow mounting to names that don't exist yet? > > mntgen(4) linux has the same restriction, and no mntgen. :-) - erik

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Skip Tavakkolian
> What is the reason for performing namespace > inheritance by copy as opposed to namespace inheritance by reference? > Is it just to simplify the implementation? i assume by reference you mean shared between parent and child. most of the time you don't want the child process to change the

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Casey Rodarmor
Thanks Skip and Anthony for the scripts! Okay, that makes sense. What is the reason for performing namespace inheritance by copy as opposed to namespace inheritance by reference? Is it just to simplify the implementation? It seems like it might be useful. For example, if you had a daemon that

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Anthony Martin
Anthony Martin once said: > Casey Rodarmor once said: > > Also, whatever the answer is, how can I test this for myself? I was > > struggling to come up with a combination of commands, short of writing > > some C programs, which would let me have two

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Anthony Martin
Casey Rodarmor once said: > > Let's say I have a process A which forks a child process B with the > > RFNAMEG so it receives a copy of A's namespace. > > > > If process A then makes a change to its namespace, will process B see > > that change? Or does B receive a distinct

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Skip Tavakkolian
lets create a couple of shell scripts like this: 1) ns_shared: #! /bin/rc cat /n/tmp/foo ramfs -m /n/tmp # start another ramfs in the child's namespace echo something > /n/tmp/foo cat /n/tmp/foo exit 2) ns_RFNAMEG #! /bin/rc rfork

Re: [9fans] Namespace inheritance between processes

2016-05-21 Thread Casey Rodarmor
On Sat, May 21, 2016 at 12:26 AM, Casey Rodarmor wrote: > Hi 9 fans, > > I'm trying to figure out how namespace inheritance between process groups > works. > > Let's say I have a process A which forks a child process B with the > RFNAMEG so it receives a copy of A's

[9fans] Namespace inheritance between processes

2016-05-21 Thread Casey Rodarmor
Hi 9 fans, I'm trying to figure out how namespace inheritance between process groups works. Let's say I have a process A which forks a child process B with the RFNAMEG so it receives a copy of A's namespace. If process A then makes a change to its namespace, will process B see that change? Or