From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MaoA6-0001Cb-Qm for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:00:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MaoA2-0001Ax-UK for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:00:58 -0400 Received: from [199.232.76.173] (port=56258 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MaoA2-0001Aj-On for qemu-devel@nongnu.org; Tue, 11 Aug 2009 06:00:54 -0400 Message-ID: <4A8142C3.5020707@redhat.com> Date: Tue, 11 Aug 2009 13:06:59 +0300 From: Avi Kivity 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> <4A813D94.9020609@gnu.org> In-Reply-To: <4A813D94.9020609@gnu.org> 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: Paolo Bonzini Cc: Chris Lalancette , qemu-devel@nongnu.org On 08/11/2009 12:44 PM, Paolo Bonzini wrote: > > 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. Yes, arbitrary fd definitely needs to skip accept(). -- error compiling committee.c: too many arguments to function