]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add helper for running code in separate namespaces
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 30 Jan 2014 13:11:23 +0000 (13:11 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 18 Feb 2014 16:00:09 +0000 (16:00 +0000)
commitf7b4d314c734908ca4f45e74aac10e7c2d711918
tree09d6e94adc82ae05504a7ecd26b2594e7990f95a
parent4f2282e9e1bb55b56b929a38512a6ef3e4319c44
Add helper for running code in separate namespaces

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@gmail.com> at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732394

Signed-off-by: Daniel Berrange <berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 7c72ef6f555f1f9844d51be2f38f078bc908652c)
src/libvirt_private.syms
src/util/virprocess.c
src/util/virprocess.h