From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVew0-0005Et-AO for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVevx-0005C9-FS for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:27:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVevv-0005Bs-Cy for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:27:13 -0400 Date: Fri, 26 Apr 2013 11:25:12 +0200 From: Stefan Hajnoczi Message-ID: <20130426092512.GD17609@stefanha-thinkpad.redhat.com> References: <1366944455-14239-1-git-send-email-qemulist@gmail.com> <1366944455-14239-5-git-send-email-qemulist@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1366944455-14239-5-git-send-email-qemulist@gmail.com> Subject: Re: [Qemu-devel] [RFC PATCH v5 04/14] net: port vde onto GSource List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: mdroth , Jan Kiszka , qemu-devel@nongnu.org, Anthony Liguori , Paolo Bonzini On Fri, Apr 26, 2013 at 10:47:25AM +0800, Liu Ping Fan wrote: > +static gboolean vde_handler(gpointer data) > +{ > + EventGSource *nsrc = (EventGSource *)data; > + > + if (nsrc->gfd.revents & G_IO_IN) { The VDE file descriptor is a socket. Please use the full G_IO_IN | G_IO_HUP | G_IO_ERR set which is equivalent to select(2) rfds. This ensures we handle errors and disconnect.