[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] Migration via unix sockets.

From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH] Migration via unix sockets.
Date: Tue, 11 Aug 2009 13:06:59 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]