From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USVch-00040I-2p for qemu-devel@nongnu.org; Wed, 17 Apr 2013 12:54:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USVcf-0001qF-OC for qemu-devel@nongnu.org; Wed, 17 Apr 2013 12:54:19 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:44313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USVcf-0001q8-Jf for qemu-devel@nongnu.org; Wed, 17 Apr 2013 12:54:17 -0400 Received: by mail-qc0-f177.google.com with SMTP id u28so802140qcs.8 for ; Wed, 17 Apr 2013 09:54:16 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <516ED3AC.9050907@redhat.com> Date: Wed, 17 Apr 2013 18:54:04 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365600207-21685-1-git-send-email-pbonzini@redhat.com> <516D16A4.2030105@redhat.com> <516D1B1B.6020603@redhat.com> <516EC18E.7060702@redhat.com> In-Reply-To: <516EC18E.7060702@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-char: another io_add_watch_poll fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: amit.shah@redhat.com, aliguori@us.ibm.com, Gerd Hoffmann , qemu-devel@nongnu.org Il 17/04/2013 17:36, Hans de Goede ha scritto: >>> >> >> I'm not sure why all users of qemu_chr_fe_add_watch believe that the >> watch will be one-shot. This is definitely not what g_io_create_watch >> does... > > It is supposed to depend on the return value of the callback, if you > return False, then the source should be removed, in essence making > the watch one-shot, see: > http://www.gtk.org/api/2.6/glib/glib-The-Main-Event-Loop.html#GSourceFunc Yeah, I found that later. :) Paolo