From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Mon, 17 Aug 2009 10:33:22 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <8763co99ax.fsf@gmx.de> <87eircq6td.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1250472826 30778 80.91.229.12 (17 Aug 2009 01:33:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Aug 2009 01:33:46 +0000 (UTC) Cc: Mario Lang , "emacs-devel@gnu.org" To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 17 03:33:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mcr6R-0005lY-3R for ged-emacs-devel@m.gmane.org; Mon, 17 Aug 2009 03:33:39 +0200 Original-Received: from localhost ([127.0.0.1]:34042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mcr6Q-0000p3-AD for ged-emacs-devel@m.gmane.org; Sun, 16 Aug 2009 21:33:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mcr6L-0000oo-Rw for emacs-devel@gnu.org; Sun, 16 Aug 2009 21:33:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mcr6H-0000oc-Bl for emacs-devel@gnu.org; Sun, 16 Aug 2009 21:33:33 -0400 Original-Received: from [199.232.76.173] (port=60263 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mcr6H-0000oZ-9b for emacs-devel@gnu.org; Sun, 16 Aug 2009 21:33:29 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:61736 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mcr6G-00060A-G0 for emacs-devel@gnu.org; Sun, 16 Aug 2009 21:33:29 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id D53F42C40; Mon, 17 Aug 2009 10:33:22 +0900 (JST) In-Reply-To: <87eircq6td.fsf@gmx.de> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114330 Archived-At: >>>>> On Sun, 16 Aug 2009 14:30:54 +0200, Michael Albinus said: > Finally, it was sufficient to add the D-Bus file descriptors via > add_keyboard_wait_descriptor. Thanks for pushing me into the right > direction! But again, the documentation of dbus_connection_get_socket/dbus_connection_get_unix_fd says "DO NOT read or write to the file descriptor, or try to select() on it; use DBusWatch for main loop integration." What you want to do is actually a kind of "main loop integration", though it looks a bit different from those in typical GUI toolkits. Actually, I'm not sure how the above caveat is serious/critical. Maybe you can ask at some D-Bus list. >> As far as I browsed some D-Bus documents, >> dbus_connection_set_watch_functions seems to have something to do >> with this. > DBusWatch uses its own select() loop. So it seems to be better to > avoid it. Perhaps you are looking at the code of the default (or sample) implementation of the "main loop integration"? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp