dbus_connection_dispatch calls exit

Sebastian Pölsterl marduk at k-d-w.org
Wed Oct 15 08:29:13 PDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Scott James Remnant schrieb:
> On Wed, 2008-10-15 at 16:03 +0200, Sebastian Pölsterl wrote:
> 
>> I'm writing a daemon to manage DVB cards and make use of D-Bus to
>> communicate with other applications using dbus-glib. Recently, I
>> discovered that dbus_connection_dispatch calls the exit function when
>> scanning for channels takes longer (like for DVB-S).
>>
>> In which scenario does dbus_connection_dispatch call exit and how can I
>> prevent it from doing this? Maybe, dbus_server_setup_with_g_main is useful?
>>
> It calls exit() when the bus connection is lost.
> 
I wonder why the connection gets lost, though. The client is still
running when it exits. Is there some kind of timeout involved?

> You can prevent this by calling dbus_connection_set_exit_on_disconnect
> with FALSE as an argument, after dbus_bus_get() - which on more recent
> versions of dbus will not call exit() itself if it fails to get a
> connection.
> 
Thanks, I try that.

- --
Greetings,
Sebastian Pölsterl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI9gxJ1ygZeJ3lLIcRAkK0AJ9uAMFaCHbA3WRj3/2y24M1u58WpQCfWqgK
F3f8PxuAg7rleRVFB9NIBS0=
=uaU+
-----END PGP SIGNATURE-----


More information about the dbus mailing list