Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Andrea Bolognani
On Fri, 2021-03-12 at 15:24 +0100, Michal Privoznik wrote: > On 3/12/21 11:42 AM, Andrea Bolognani wrote: > > On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > > > +++ b/src/qemu/qemu_shim.c > > > @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) > > > while (!quit)

Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Michal Privoznik
On 3/12/21 11:42 AM, Andrea Bolognani wrote: On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: +++ b/src/qemu/qemu_shim.c @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) while (!quit) { g_mutex_lock(); if (eventQuitFlag &&

Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Andrea Bolognani
On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > +++ b/src/qemu/qemu_shim.c > @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) > while (!quit) { > g_mutex_lock(); > if (eventQuitFlag && !eventPreventQuitFlag) { > +quit = true; >

[PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-01 Thread Michal Privoznik
The qemu shim spawns a separate thread in which the event loop is ran. The virEventRunDefaultImpl() call is wrapped in a while() loop, just like it should. There are few lines of code around which try to ensure that domain is destroyed (when quitting) and that the last round of event loop is ran