Skip to contentSkip to conversation

kvm tools: Wait for VCPU to reboot before returning

PATCH New Sasha Levin 1 participant 1 message Jul 11, 2011 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm tools: Wait for VCPU to reboot before returning

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.

---
 tools/kvm/kvm-cpu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/kvm/kvm-cpu.c +1 -0
index 2f5d23c..5825ac9 100644
@@ -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)
Signature · 1 line
1.7.6