Re: [PATCH 3/3] Remove wrong check for uml monitor response size

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

 



On 08/12/2010 03:00 AM, Soren Hansen wrote:
> The current check for the size of the response from the uml monitor is
> problematic for a couple of reasons:
> 
> First of all, for me, the call to recvfrom returns 0, even though the
> buffer actually is populated with the response from the monitor.

I'm not sure about this one.  The recvfrom is called in a loop, and
POSIX says that recvfrom shall return the size if a message was read, or
0 if no messages were available but the other end of the connection did
an orderly shutdown.  I think we need a bit more understanding of why
you are getting a 0 return, and whether it only happens after a
successful iteration of the loop (in which case the contents of res are
leftover from the prior iteration).

> 
> At any rate, the only way I can get anything useful to happen here is to
> completely remove the check, so this patch does just that.

In other words, maybe the better thing to do is add an earlier check:
if (nbytes == 0) break;
but I'm not sure of that idea, either, without more understanding of the
root cause.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]