qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 3/9] qemu.py: Add "wait()" method


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH RFC 3/9] qemu.py: Add "wait()" method
Date: Thu, 17 Aug 2017 04:50:59 +0800
User-agent: Mutt/1.8.3 (2017-05-23)

On Wed, 08/16 09:32, Stefan Hajnoczi wrote:
> On Wed, Aug 16, 2017 at 03:20:58PM +0800, Fam Zheng wrote:
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  scripts/qemu.py | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/scripts/qemu.py b/scripts/qemu.py
> > index e5f314efdb..3e7eb44035 100644
> > --- a/scripts/qemu.py
> > +++ b/scripts/qemu.py
> > @@ -144,6 +144,11 @@ class QEMUMachine(object):
> >              self._post_shutdown()
> >              raise
> >  
> > +    def wait(self):
> > +        self._popen.wait()
> > +        self._qmp.close()
> > +        self._post_shutdown()
> > +
> 
> Please include docstrings for public methods.

OK.

> 
> Is this method for users who do not use shutdown() because the guest
> halts itself?

Yes, cooperative shutdown (e.g. "shutdown" command from guest or acpi signal) is
cleaner when we want to make sure changes are flushed to disk.

> 
> Why is self._load_io_log() not called?

Will add it.

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]