On 02/07/2014 08:33 AM, Daniel P. Berrange wrote:
> Implement virProcessRunInMountNamespace, which runs callback of type
> virProcessNamespaceCallback in a container namespace. This uses a
> child process to run the callback, since you can't change the mount
> namespace of a thread. This implies that callbacks have to be careful
> about what code they run due to async safety rules.
>
> Idea by Dan Berrange, based on an initial report by Reco
> <recoverym4n(a)gmail.com> at
>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732394
>
> Signed-off-by: Daniel Berrange <berrange(a)redhat.com>
Looks like you improved from my version, so it would be nice to add:
Signed-off-by: Eric Blake <eblake(a)redhat.com>
Sure. What happened is that I started with your code, then I
rewrote the method from scratch to use threads, then I found
threads + mount namespace didn't work, so I rewrote it again
to use fork again. Fun times :-)
Daniel
--
|: