[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 1/7] qemu.py: use poll() instead of 'returnco
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v6 1/7] qemu.py: use poll() instead of 'returncode' |
Date: |
Mon, 31 Jul 2017 11:07:49 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, Jul 31, 2017 at 10:51:04AM +0200, Amador Pahim wrote:
> The 'returncode' Popen attribute is not guaranteed to be updated. It
> actually depends on a call to either poll(), wait() or communicate().
>
> On the other hand, poll() will: "Check if child process has terminated.
> Set and return returncode attribute."
>
> Let's use the poll() to check whether the process is running and also
> to get the updated process exit code, when the process is finished.
>
> Signed-off-by: Amador Pahim <address@hidden>
> Reviewed-by: Fam Zheng <address@hidden>
> Reviewed-by: Stefan Hajnoczi <address@hidden>
This breaks the current version of shutdown(). Assuming that
patch 6/7 will fix that (I didn't review patch 6/7 yet), this
needs to be moved to the end of the series.
--
Eduardo
- [Qemu-devel] [PATCH v6 0/7] scripts/qemu.py fixes and cleanups, Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 2/7] qemu.py: fix is_running() return before first launch(), Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 3/7] qemu.py: use python logging system, Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 1/7] qemu.py: use poll() instead of 'returncode', Amador Pahim, 2017/07/31
- Re: [Qemu-devel] [PATCH v6 1/7] qemu.py: use poll() instead of 'returncode',
Eduardo Habkost <=
- [Qemu-devel] [PATCH v6 4/7] qemu.py: improve message on negative exit code, Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 5/7] qemu.py: use os.path.null instead of /dev/null, Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 6/7] qemu.py: cleanup and improve launch()/shutdown(), Amador Pahim, 2017/07/31
- [Qemu-devel] [PATCH v6 7/7] qemu.py: include debug information on launch error, Amador Pahim, 2017/07/31