[libvirt] [PATCH v2 1/4] tools: console: cleanup console on errors in main thread

Daniel P. Berrangé berrange at redhat.com
Fri Mar 15 10:56:59 UTC 2019


On Wed, Mar 13, 2019 at 10:39:46AM +0300, Nikolay Shirokovskiy wrote:
> We only check now for virObjectWait failures in virshRunConsole but
> we'd better check and for other failures too. Anyway if failure
> happened we need to shutdown console to stop delivering events
> from event loop thread or we are in trouble as console is freed
> on virshRunConsole exit.
> 
> We need to turn console into virObject object because stream/fd callbacks
> can be called from a event loop thread after shutdown/freeing console
> in main thread. It is convinient to turn into virLockableObject as
> we have mutex in console object.

Could you do this in two separate patches - one which refactors into
a virObject, and the second which does the actual error handling
fixes.

The changes look ok, but distinguishing the actual fix from the
refactoring is hard.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list