aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-08-01 15:23:43 +0400
committerMarkus Armbruster <armbru@redhat.com>2016-08-08 14:17:00 +0200
commita384c205acaa4b6fe6d4d392af47b49b2c448eb4 (patch)
treee4169ed10e099e09ce4fa4209ac29fb9afa36a0d /vl.c
parent2ef45716e1d4820f10a90ee2f17a9cb4fe5a8806 (diff)
audio: clean up before monitor clean up
Since aa5cb7f5e, the chardevs are being cleaned up when leaving qemu, before the atexit() handlers. audio_cleanup() may use the monitor to notify of changes. For compatibility reasons, let's clean up audio before the monitor so it keeps emitting monitor events. The audio_atexit() function is made idempotent (so it can be called multiple times), and renamed to audio_cleanup(). Since coreaudio backend is using a 'isAtexit' code path, change it to check audio_is_cleaning_up() instead, so the path is taken during normal exit. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20160801112343.29082-3-marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index a14c438d38..c4eeaffb91 100644
--- a/vl.c
+++ b/vl.c
@@ -4612,6 +4612,7 @@ int main(int argc, char **argv, char **envp)
/* vhost-user must be cleaned up before chardevs. */
net_cleanup();
+ audio_cleanup();
monitor_cleanup();
qemu_chr_cleanup();