migration: Clean up use of g_poll() in socket_writev_buffer()
commit4e39f57c0010b689ffa15658ff063006b45309db
authorMarkus Armbruster <armbru@redhat.com>
Tue, 1 Dec 2015 13:34:14 +0000 (1 14:34 +0100)
committerJuan Quintela <quintela@redhat.com>
Wed, 2 Dec 2015 23:03:00 +0000 (3 00:03 +0100)
treecfde9aa52861f9f9d05a8c2efd39b1bff84b1380
parentcf22132367a188426ac07cf1805b214dd2d0cc80
migration: Clean up use of g_poll() in socket_writev_buffer()

socket_writev_buffer() writes in a loop, using g_poll() to block.  If
g_poll() fails, it tries to write more before the file descriptor is
ready.  In theory, this could go into a tight loop.  In practice,
errors other than EINTR are really unlikely, and when they happen,
we're probably screwed anyway, so we can just as well loop.

Clean it up a bit: retry poll on EINTR, keep ignoring other errors.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/qemu-file-unix.c