mirror of https://gitee.com/openkylin/libvirt.git
4594a33b4b
Note that 'virsh lxc-enter-namespace' must double-fork, for two reasons: some namespaces can only be done from a single thread, while virsh is multithreaded; and because virsh can be run in batch mode where we must not corrupt the namespace of that execution upon return from the subsidiary command. When virt-login-shell was first written, it blindly copied from 'virsh lxc-enter-namespace', including the double-fork. But neither of the reasons for double forking apply to virt-login-shell (we are single-threaded, and we have nothing to do after the child completes that would require us to preserve a namespace), so we can simplify life by using a single fork. In turn, this will make it easier for a future patch to pass the child's exit status on to the invoking shell. In flattening to a single fork, note that closing the fds must be done after fork, because the parent process still needs to use fds to control the virConnectPtr; meanwhile, chdir can be done prior to forking (in fact, it's easier to report errors on anything attempted before forking). * tools/virt-login-shell.c (main): Single rather than double fork. (virLoginShellFini): Delete, by inlining actions instead. Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.gnulib@72fb9075b2 | ||
build-aux | ||
daemon | ||
docs | ||
examples | ||
gnulib | ||
include | ||
m4 | ||
po | ||
src | ||
tests | ||
tools | ||
.ctags | ||
.dir-locals.el | ||
.gitignore | ||
.gitmodules | ||
.mailmap | ||
AUTHORS.in | ||
COPYING | ||
COPYING.LESSER | ||
ChangeLog-old | ||
HACKING | ||
Makefile.am | ||
Makefile.nonreentrant | ||
README | ||
README-hacking | ||
TODO | ||
autobuild.sh | ||
autogen.sh | ||
bootstrap | ||
bootstrap.conf | ||
cfg.mk | ||
config-post.h | ||
configure.ac | ||
libvirt.pc.in | ||
libvirt.spec.in | ||
mingw-libvirt.spec.in | ||
run.in |
README
LibVirt : simple API for virtualization Libvirt is a C toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C API initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed. Daniel Veillard <veillard@redhat.com>