From: Sasha Levin Subject: [PATCH] kvm tools: Wait for VCPU to reboot before returning Date: Mon, 11 Jul 2011 22:49:06 +0300 Message-ID: <1310413746-1530-1-git-send-email-levinsasha928@gmail.com> Cc: mingo@elte.hu, asias.hejun@gmail.com, prasadjoshi124@gmail.com, gorcunov@gmail.com, kvm@vger.kernel.org, Sasha Levin To: penberg@kernel.org Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:39653 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757774Ab1GKTta (ORCPT ); Mon, 11 Jul 2011 15:49:30 -0400 Received: by wwe5 with SMTP id 5so4248944wwe.1 for ; Mon, 11 Jul 2011 12:49:29 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Wait until all VCPU threads have received the reboot signal and have exited. This prevents the occasional error messages when exiting kvm tools with the ctrl a + x combo. Reported-by: Asias He Signed-off-by: Sasha Levin --- tools/kvm/kvm-cpu.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/kvm/kvm-cpu.c b/tools/kvm/kvm-cpu.c index 2f5d23c..5825ac9 100644 --- a/tools/kvm/kvm-cpu.c +++ b/tools/kvm/kvm-cpu.c @@ -422,6 +422,7 @@ static void kvm_cpu__handle_coalesced_mmio(struct kvm_cpu *cpu) void kvm_cpu__reboot(void) { pthread_kill(kvm_cpus[0]->thread, SIGKVMEXIT); + pthread_join(kvm_cpus[0]->thread, NULL); } int kvm_cpu__start(struct kvm_cpu *cpu) -- 1.7.6