On Wed, Nov 27, 2019 at 03:52:00PM +0400, Marc-André Lureau wrote:
> The file opened for ppm_save() may be a /dev/fdset, in which case a
> dup fd is added to the fdset. It should be removed by calling
> qemu_close(), instead of the implicit close() on fclose().
> 
> I don't see a convenient way to solve that with stdio streams, so I
> switched the code to QIOChannel which uses qemu_close().

The only way is to duplicate what qemu_close() does in the
ppm_save method by calling  monitor_fdset_dup_fd_remove(fd).
Using QIOChannel is fine too though.

> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> ---
>  ui/console.c | 38 +++++++++++++++++---------------------
>  1 file changed, 17 insertions(+), 21 deletions(-)

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


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 :|


Reply via email to