From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Manui-0003oN-II for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:45:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Manud-0003mW-IW for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:45:03 -0400 Received: from [199.232.76.173] (port=40050 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Manud-0003mP-BF for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:44:59 -0400 Received: from mx20.gnu.org ([199.232.41.8]:58056) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Manuc-0002EU-Mb for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:44:58 -0400 Received: from an-out-0708.google.com ([209.85.132.249]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Manub-00069E-JO for qemu-devel@nongnu.org; Tue, 11 Aug 2009 05:44:57 -0400 Received: by an-out-0708.google.com with SMTP id c38so1153713ana.37 for ; Tue, 11 Aug 2009 02:44:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4A813D94.9020609@gnu.org> Date: Tue, 11 Aug 2009 11:44:52 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1249485869-23590-1-git-send-email-clalance@redhat.com> <4A7FF53F.2000106@redhat.com> <4A8005B4.9030600@redhat.com> <4A8136CF.5040304@redhat.com> In-Reply-To: <4A8136CF.5040304@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Migration via unix sockets. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Lalancette Cc: Avi Kivity , qemu-devel@nongnu.org > That means that you have to first arrange for it not to be closed on > exec, and it also means that qemu is now depending on the external > program to correctly set up the incoming socket so that qemu can just > do the accept() on it. At this point, I wonder if it isn't better to move the accept to the external program, so that it could even use a pipe. The accept can be replaced by struct pollfd pfd; pfd.fd = fd; pfd.events = POLLIN; poll (&pfd, 1, INFTIM); if (pfd.revents & (POLLERR | POLLHUP | POLLNVAL)) handle_error (); or the equivalent using select. Paolo