Dbus method call sent but no reply got

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Sep 17 04:59:12 PDT 2013

On 17/09/13 12:40, Fei Zheng wrote:
> Glib and Qt are licensed under GPL, if I use them, the code should be
> open, right?  That is why I choose the low-level API.

GLib and Qt are both licensed under the Lesser GPL, a weaker copyleft
license than the GPL, which means they can be used in proprietary software.

> In my  test code the posix signal handler is used to send the reply
> asynchronously, it also could be replaced by a posix thread etc.

D-Bus is designed to be used asynchronously from a main loop (event
loop, etc.) - see <https://en.wikipedia.org/wiki/Event_loop> and
specifically the "File interface" section. I recommend this approach.

In my experience, using threads to emulate asynchronous I/O only works
if you are very, very careful, and if not, you just get:

"You had a problem and you solved it with threads. Now you have two
problems, in parallel, and they interfere with each other."

Worse, using POSIX signals to emulate asynchronous I/O tends to result in:

"You had a problem and you solved it with POSIX signals. Now you still
have a problem, but it can be interrupted at any time by another problem."


More information about the dbus mailing list