From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Sun, 26 Sep 2010 18:31:31 +0200 Message-ID: <4C9F7563.3090608@swipnet.se> References: <878w2tx6gk.fsf@gmx.de> <4C9A493F.4050701@cornell.edu> <874odhyliu.fsf@gmx.de> <4C9B452E.1040101@cornell.edu> <4C9B63A1.2060604@cornell.edu> <87y6asy0uh.fsf@gmx.de> <4C9BBD5C.30201@cornell.edu> <83tylgtbo8.fsf@gnu.org> <871v8jhcw2.fsf@gmx.de> <4C9CB57E.1010708@swipnet.se> <8339sztayd.fsf@gnu.org> <87tyleetju.fsf@gmx.de> <4C9DA26F.4030007@swipnet.se> <87mxr5epfa.fsf@gmx.de> <4C9E39A1.8050608@swipnet.se> <87hbhdee7k.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1285518710 28349 80.91.229.12 (26 Sep 2010 16:31:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 26 Sep 2010 16:31:50 +0000 (UTC) Cc: Eli Zaretskii , kbrown@cornell.edu, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 26 18:31:49 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 1Ozu8h-0001KV-Lc for ged-emacs-devel@m.gmane.org; Sun, 26 Sep 2010 18:31:48 +0200 Original-Received: from localhost ([127.0.0.1]:33780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ozu8g-0008UF-TL for ged-emacs-devel@m.gmane.org; Sun, 26 Sep 2010 12:31:46 -0400 Original-Received: from [140.186.70.92] (port=35654 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ozu8a-0008T1-N7 for emacs-devel@gnu.org; Sun, 26 Sep 2010 12:31:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ozu8Z-0004Z3-KO for emacs-devel@gnu.org; Sun, 26 Sep 2010 12:31:40 -0400 Original-Received: from smtprelay-h21.telenor.se ([195.54.99.196]:50517) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ozu8X-0004YL-AK; Sun, 26 Sep 2010 12:31:37 -0400 Original-Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-h21.telenor.se (Postfix) with ESMTP id 9EB05C423; Sun, 26 Sep 2010 18:31:35 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aow/ANYSn0xV4S0jPGdsb2JhbACDG4RSmkcMAQEBATUtsgqRO4Eigy50BI04 X-IronPort-AV: E=Sophos;i="4.57,239,1283724000"; d="scan'208";a="1675260702" Original-Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb4.telenor.se with ESMTP; 26 Sep 2010 18:31:32 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id BFB637FA05A; Sun, 26 Sep 2010 18:31:31 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 In-Reply-To: <87hbhdee7k.fsf@gmx.de> 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:130923 Archived-At: Michael Albinus skrev 2010-09-25 22.54: > Jan Dj=C3=A4rv writes: > >>> If I test it in a non-X11 terminal, arriving D-Bus messages are >>> recognised only after pressing a character on the keyboard. So at lea= st >>> an additional trigger is missing to handle this event in time. >> >> This sounds like a bug. I'll have a look. Is this the same emacs >> binary for X and non-X you are running? > > Yes. > >> I don't understand why there is #ifdef subprocess around >> add/delete_keyboard_wait_descriptor, but it should not matter. > > For testing, I use the example in (info "(dbus) Receiving Method Calls"= ) > In the non-X test case, you must call dbus-send from another terminal, > with the same $DBUS_SESSION_BUS_ADDRESS set. > Ok, I checked in several changes. There where at least two bugs. First dbusbind didn't process all messages, just one. So things didn't w= ork=20 well when DBUS had read more than one message into its queue. This was masked by another bug in xg_select, file descriptors where wrong= ly=20 indiocated to be read when they where not. This made things work in X, b= ut=20 not in a terminal. This bug I fixed in the emacs-23 branch. I went ahead and added a more general file descriptor handling in process= .c,=20 where you can add a file descriptor for reading or writing and get a call= back=20 when I/O is possible. I then modified dbusbind to use that so writes als= o are=20 asynchronous. If the recevier wasn't reading and Emacs writes a lot of D= Bus=20 messages, a hang could occur (not that it is very likely, dbus isn't made= for=20 passing a lot of data around). So please try this version. Jan D.