> So far, it looks like the closest equivalent is to draw a new window
> and inherit the namespace of the original one by reading the namespace
> from the proc.
The problem with /proc/$pid/ns is entries that can't be "replayed".
For example, the following command will not work:
mount -b '#|/data' /mnt
Nor does it provide any real indication as to what exactly is hooked
up to the other end of the 9P pipe.
> I wonder if there could be a Rio gesture to draw a new window
> inheriting the namespace of the window I pick by clicking.
Rio can't access the namespaces of the processes running in its
windows. The -m option to window(1) works by rforking a new process
with the RFNAMEG flag set and then doing the appropriate mounting and
binding to create and use a new rio window.
Some months ago I played with the idea of adding support for an
"nsjoin" command to the /proc/$pid/ctl file. This allowed you to join
the namespace of another process a little something like this:
term% ps | grep plumber
alex 670 0:00 0:00 864K Pread plumber
alex 671 0:00 0:00 864K Rendez plumber
term% echo nsjoin 670 >/proc/$pid/ctl
term%
Subsequent changes to the namespace would affect the plumber. If you
wanted a copy, just do 'rfork n' after joining the namespace.
Of course, a lot of the isolation that per-process namespaces give you
is suddenly undone by the introduction of this facility. At this
point I'm not entirely convinced that it's worth the trouble.
--
Cheers,
Alex Musolino