On Tue, Jun 28, 2022 at 10:17 AM Daniel P. Berrangé <berra...@redhat.com> wrote: > > On Tue, Jun 28, 2022 at 05:49:39PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > > > QMP accept is currently synchronous. If qemu dies before the connection > > is established, it will wait there. Instead turn the code to do > > concurrently accept() and wait(). Returns when the first task is > > completed to determine whether a connection was established. > > If the spawned QEMU process was given -daemonize, won't this code > mistakenly think the subprocess has quit ?
Do we use daemonize with this code anywhere? Is it important that we are able to? Many of the shutdown routines I wrote expect to work directly with a launched process ... at least, that expectation exists in my head. I suppose a lot of this code may actually just coincidentally work with -daemonize and I wouldn't have noticed. I certainly haven't been testing it explicitly. I definitely make no accommodations for it, so I would expect some stale processes in various cases at a minimum. If we want to expand to accommodate this feature, can we do that later? Machine needs a bit of a remodel anyway. (I want to write an 'idiomatic' asyncio version to match the QMP lib. I have some questions to work out WRT which portions of this appliance can be upstreamed and which need to remain only in our testing tree. We can talk about those pieces later, just throwing it out there that it's on my list.) --js