emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading D-Bus messages


From: Ken Brown
Subject: Re: Reading D-Bus messages
Date: Sun, 26 Sep 2010 14:24:54 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

On 9/26/2010 12:31 PM, Jan Djärv wrote:


Michael Albinus skrev 2010-09-25 22.54:
Jan Djärv<address@hidden>   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 least
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 work
well when DBUS had read more than one message into its queue.
This was masked by another bug in xg_select, file descriptors where wrongly
indiocated to be read when they where not.  This made things work in X, but
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,
where you can add a file descriptor for reading or writing and get a callback
when I/O is possible.  I then modified dbusbind to use that so writes also are
asynchronous.  If the recevier wasn't reading and Emacs writes a lot of DBus
messages, a hang could occur (not that it is very likely, dbus isn't made for
passing a lot of data around).

So please try this version.

Works for me in Cygwin.  Thanks.

Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]