dbus_connection_dispatch calls exit

Scott James Remnant scott at canonical.com
Wed Oct 15 07:35:36 PDT 2008


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.

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.

Scott
-- 
Scott James Remnant
scott at canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20081015/f38c454b/attachment.pgp 


More information about the dbus mailing list