Re: [PATCH 08/14] Add helper for running code in separate namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2014 at 10:31:03AM -0700, Eric Blake wrote:
> 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@xxxxxxxxx> at
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732394
> > 
> > Signed-off-by: Daniel Berrange <berrange@xxxxxxxxxx>
> 
> Looks like you improved from my version, so it would be nice to add:
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>

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
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]