On Tue, 31 Jan 2023 at 08:38, Mikko Rapeli <[email protected]> wrote:
> On Mon, Jan 30, 2023 at 11:11:25PM +0100, Alexander Kanavin wrote:
> > This does not actually guarantee that the child runqemu process has 
> > completely exited:
> > poll() may return prematurely while the SIGTERM handler in runqemu is still 
> > running.
> > This thwarts the rest of the processing, and may terminate the handler 
> > before
> > it completes.
> >
> > Use Popen.communicate() instead: this is what python documentation 
> > recommends as well:
> > https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
>
> Was I trying to solve the same problem in
> https://lists.openembedded.org/g/openembedded-core/message/176203 ?
>
> I think so.

No, this is different. Your patch treats qemu process itself, mine
fixes the problem with runqemu script. The whole qemurunner.py is a
mess, for example it sends SIGTERM to both qemu and runqemu, where one
or the other should be sufficient (runqemu will shutdown qemu if it is
itself terminating, and will terminate if it detects that qemu
finished). But I left that for another time. I only want a clean,
reliable shutdown of runqemu.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176514): 
https://lists.openembedded.org/g/openembedded-core/message/176514
Mute This Topic: https://lists.openembedded.org/mt/96639889/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to