qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH] Migration via unix sockets.
Date: Tue, 11 Aug 2009 11:44:52 +0200
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

> 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




reply via email to

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