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: Reading D-Bus messages Date: Wed, 22 Sep 2010 15:18:03 +0200 Message-ID: <878w2tx6gk.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285161510 26611 80.91.229.12 (22 Sep 2010 13:18:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2010 13:18:30 +0000 (UTC) Cc: Ken Brown To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 15:18:25 2010 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.69) (envelope-from ) id 1OyPDM-0005zN-8L for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2010 15:18:24 +0200 Original-Received: from localhost ([127.0.0.1]:60320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyPDL-00089V-JD for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2010 09:18:23 -0400 Original-Received: from [140.186.70.92] (port=46735 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyPDD-00087g-SF for emacs-devel@gnu.org; Wed, 22 Sep 2010 09:18:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyPD7-0001hg-Rv for emacs-devel@gnu.org; Wed, 22 Sep 2010 09:18:15 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:55729 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OyPD7-0001hB-Cx for emacs-devel@gnu.org; Wed, 22 Sep 2010 09:18:09 -0400 Original-Received: (qmail invoked by alias); 22 Sep 2010 13:18:06 -0000 Original-Received: from p4FC18F10.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [79.193.143.16] by mail.gmx.net (mp026) with SMTP; 22 Sep 2010 15:18:06 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX18/fnRwxeM/6kePzsex6Oxgjjcy+ZCogMdhxIZbc1 uWMLMYgVGm0bS+ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:130620 Archived-At: Hi, I'm trying to make Emacs' D-Bus bindings running also in a cygwin environment. Synchronous D-Bus messages are handled fine. The problem is reading asynchronous messages. dbusbind.c offers two functions: xd_pending_messages (called in readable_events), which returns TRUE when there are D-Bus messages to be read, and xd_read_queued_messages (called in gobble_input), which reads the message(s). That works OK on GNU/Linux (and other systems, I haven't tested myself). With cygwin, after the first time a D-Bus message has arrived, and xd_pending_messages has returned TRUE, Emacs is blocked. According to the traces, xd_pending_messages is called again and again, and xd_pending_messages isn't called ever. I do not understand all details of keyboard.c. Is there something I need to set in order to urge the call of xd_read_queued_messages (via gobble_input)? Or do I need to suppress further polling? What is the difference for Emacs running with cygwin, compared with the GNU/Linux case? Btw, when I call xd_read_queued_messages inside xd_pending_messages, everything works fine also with cygwin. But I guess this isn't the correct solution. Thanks, and best regards, Michael.