]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Manually kill gzip if restore fails before starting qemu
authorLaine Stump <laine@laine.org>
Mon, 24 Jan 2011 16:58:15 +0000 (11:58 -0500)
committerLaine Stump <laine@laine.org>
Wed, 26 Jan 2011 15:13:43 +0000 (10:13 -0500)
commitc9c794b52bea18d998e9affa0c166c6bcf475348
treed261f832b8779c757a9586337263d09870bb4c8d
parent3493f1bcec5d6b8e0276b9daf48c458cc756187d
Manually kill gzip if restore fails before starting qemu

If a guest image is saved in compressed format, and the restore fails
in some way after the intermediate process used to uncompress the
image has been started, but before qemu has been started to hook up to
the uncompressor, libvirt will endlessly wait for the uncompressor to
finish, but it never will because it's still waiting to have something
hooked up to drain its output.

The solution is to close the pipes on both sides of the uncompressor,
then send a SIGTERM before calling waitpid on it (only if the restore
has failed, of course).
src/qemu/qemu_driver.c