[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] oeqa/qemurunner: do not use Popen.poll() when terminating runqemu with a signa
From:       "Alexander Kanavin" <alex.kanavin () gmail ! com>
Date:       2023-01-31 11:42:15
Message-ID: CANNYZj9m-=+nJucGZpSmETJLbcmq31HwJNO7mVy=VG21CC7QjA () mail ! gmail ! com
[Download RAW message or body]

On Tue, 31 Jan 2023 at 08:38, Mikko Rapeli <mikko.rapeli@linaro.org> 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/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic