dbus_shutdown: Why do we need it?

Thiago Macieira thiago at kde.org
Tue Sep 26 11:52:17 PDT 2006


$SUBJECT says it all: why do we need dbus_shutdown? Can we deprecate it 
before 1.0, make it a dummy and remove it ASAP?

The reason I ask is because there's simply no way anyone can use it, 
AFAICS. If you call it, it means you're in charge of libdbus-1 and no one 
else. Which in turn makes it impossible to make your code be loadable as 
a plugin.

And this is what happens with QtDBus: we call dbus_shutdown. That means 
that, when the library is unloaded, it'll shut libdbus-1 down. In turn 
that means that, if it was loaded because of a plugin, when the plugin is 
unloaded, the application will be unable to do anymore D-Bus activity. 
I'd like to remove the call, but I'd like to be reasonably sure that 
there will be no ill-effects.

Obviously moving the responsibility of calling dbus_shutdown to the 
application's main() function is unacceptable. If libdbus-1 requires some 
kind of shut-down operation, it should register itself such with 
atexit(3).

Not to mention that we no longer have a corresponding "init" function: 
dbus_thread_init is now (going to be) unnecessary.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060926/7691c048/attachment.pgp


More information about the dbus mailing list