[libvirt] [PATCH 7/7] Fix busy-wait loop on closed file descriptor
Eric Blake
eblake at redhat.com
Thu Aug 19 21:14:04 UTC 2010
On 08/17/2010 11:02 AM, Daniel P. Berrange wrote:
> When closing open streams after a client quits, the event
> callback was not removed. This mean that poll() was using
> a closed FD and returning POLLNVAL in a busy-wait loop.
>
> * daemon/stream.c: Disconnect stream callbacks
> ---
> daemon/stream.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/daemon/stream.c b/daemon/stream.c
> index d64fe73..cac54ea 100644
> --- a/daemon/stream.c
> +++ b/daemon/stream.c
> @@ -108,6 +108,7 @@ remoteStreamEvent(virStreamPtr st, int events, void *opaque)
> remote_error rerr;
> memset(&rerr, 0, sizeof rerr);
> stream->closed = 1;
> + virStreamEventRemoveCallback(stream->st);
> virStreamAbort(stream->st);
ACK.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100819/5bdfe199/attachment-0001.sig>
More information about the libvir-list
mailing list