From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Sat, 15 Aug 2009 21:16:54 +0200 Message-ID: <8763co99ax.fsf@gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250363841 24853 80.91.229.12 (15 Aug 2009 19:17:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Aug 2009 19:17:21 +0000 (UTC) Cc: Mario Lang , "emacs-devel@gnu.org" To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 15 21:17:14 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 1McOkb-0002jM-8Y for ged-emacs-devel@m.gmane.org; Sat, 15 Aug 2009 21:17:13 +0200 Original-Received: from localhost ([127.0.0.1]:35381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McOka-0006RQ-8Y for ged-emacs-devel@m.gmane.org; Sat, 15 Aug 2009 15:17:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McOkU-0006RL-VA for emacs-devel@gnu.org; Sat, 15 Aug 2009 15:17:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McOkP-0006R9-IP for emacs-devel@gnu.org; Sat, 15 Aug 2009 15:17:05 -0400 Original-Received: from [199.232.76.173] (port=58858 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McOkP-0006R6-Aw for emacs-devel@gnu.org; Sat, 15 Aug 2009 15:17:01 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:46464) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1McOkO-0001Zg-OG for emacs-devel@gnu.org; Sat, 15 Aug 2009 15:17:01 -0400 Original-Received: (qmail invoked by alias); 15 Aug 2009 19:16:57 -0000 Original-Received: from p57A20708.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.7.8] by mail.gmx.net (mp053) with SMTP; 15 Aug 2009 21:16:57 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18bA2AiXBgbu62W0AU/HyvIs4DBIRrBZMJuMOqm1Q oUsnSCiFvKukCw In-Reply-To: (YAMAMOTO Mitsuharu's message of "Wed, 12 Aug 2009 20:47:56 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114279 Archived-At: YAMAMOTO Mitsuharu writes: > I mentioned DBusWatch because 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." For your purpose, doing > select() on the file/socket descriptor in wait_reading_process_output > (in process.c) is most important. I've written a function xd_pending_messages, which uses internally dbus_connection_get_dispatch_status. By this I could avoid select() on the file descriptor. D-Bus messages are now received without keyboard input, also when Emacs runs in terminal mode. However, there is a delay of some seconds. xd_pending_messages is called in readable_events, which means that it is checked inside wait_reading_process_output. Is there a possibility to trigger a more frequent check via detect_input_pending? Best regards, Michael.