]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Fix detached migration with exec.
authorChris Lalancette <clalance@redhat.com>
Wed, 5 Aug 2009 15:07:35 +0000 (17:07 +0200)
committerGlauber Costa <glommer@redhat.com>
Tue, 25 Aug 2009 20:28:06 +0000 (16:28 -0400)
When trying to do detached migration with exec, I found that
the monitor wouldn't always return in a timely manner.  I
tracked this down to exec_start_outgoing_migration.  It
appeared we were setting the fd to NONBLOCK'ing, but in
point of fact we weren't.

This bugfix should also go onto the stable 0.10 branch

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Glauber Costa <glommer@redhat.com>
migration-exec.c

index ade592eca06cee22feaa4d963157b1a1052b48bc..6786dbf657a49e8b439e606f218d9d0913951c59 100644 (file)
@@ -74,10 +74,7 @@ MigrationState *exec_start_outgoing_migration(const char *command,
         goto err_after_open;
     }
 
-    if (fcntl(s->fd, F_SETFD, O_NONBLOCK) == -1) {
-        dprintf("Unable to set nonblocking mode on file descriptor\n");
-        goto err_after_open;
-    }
+    socket_set_nonblock(s->fd);
 
     s->opaque = qemu_popen(f, "w");