]> git.ipfire.org Git - thirdparty/qemu.git/commit - qga/commands-posix.c
qemu-ga: guest-shutdown: become synchronous
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 11 May 2012 19:19:47 +0000 (16:19 -0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 15 May 2012 14:15:16 +0000 (09:15 -0500)
commitd5dd3498ebf4d6dc8661f6a9a69ae10b50f3a6a6
tree2d2a2469aabbf488974ae92f09129a83eb3b583a
parentdc8764f06155a7b3e635e02281b747a9e292127e
qemu-ga: guest-shutdown: become synchronous

Last commit dropped qemu-ga's SIGCHLD handler, used to automatically
reap terminated children processes. This introduced a bug to
qmp_guest_shutdown(): it will generate zombies.

This problem probably doesn't matter in the success case, as the VM
will shutdown anyway, but let's do the right thing and reap the
created process. This ultimately means that guest-shutdown is now a
synchronous command.

An interesting side effect is that guest-shutdown is now able to
report an error to the client if shutting down fails.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-posix.c