From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYi5h-0005Gy-Aj for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYi5c-0005EC-70 for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:44 -0400 Received: from [199.232.76.173] (port=45134 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYi5c-0005E7-1N for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:40 -0400 Received: from mx2.redhat.com ([66.187.237.31]:48870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYi5b-00015G-HC for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:39 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n75F7cHu025093 for ; Wed, 5 Aug 2009 11:07:38 -0400 From: Chris Lalancette Date: Wed, 5 Aug 2009 17:07:35 +0200 Message-Id: <1249484855-23277-1-git-send-email-clalance@redhat.com> Subject: [Qemu-devel] [PATCH] Fix detached migration with exec. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Chris Lalancette 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 --- migration-exec.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index e3616be..ef4620f 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -73,10 +73,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"); -- 1.6.0.6