[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KMaiL: Can't setup D-Bus service. Probably already running.
From: Thiago Macieira <thiago () kde ! org>
Date: 2008-02-19 13:36:00
Message-ID: 200802191436.00342.thiago () kde ! org
[Download RAW message or body]
On Tuesday 19 February 2008 14:16:44 Ralf Habacker wrote:
> I agree as a last chance, but the dbus people suggests to unregister
> services and/or pathes when they are no more needed and not to relay on
> the tcp or unix socket connection close behavior.
>
> If the connection is finalized (refcount reaches 0) your object path
> is automatically unregistered. However, typically it's better to
> unregister an object path at the point where you don't want it invoked
> anymore; after all, someone else may be holding a refcount, and you
> don't want the object path registration to accidentally stay alive,
> especially if you freed the object it refers to.
If you s/object path/service name/ in the paragraph above, it makes sense.
Otherwise it doesn't: you can't ref-count a remote object path. It's
impossible to know when it is no longer available unless the service it's on
goes away.
For KDE non-unique app service names (org.kde.appname-$PID), I see no need for
ever de-registering. For unique app service names (org.kde.kded, for
example), I also see no need for unregistering: it's present for the entire
lifetime of the process.
For services that we may claim or release, then we should also register and
de-register at the proper times.
> http://lists.freedesktop.org/archives/dbus/2008-February/009328.html
>
> This supports to unregister in the destructor of the last
> KUniqueApplication or KApplication object (may be in a static class
> method) because registering was done in the creating of the first
> KAppplication or KuniqueApplication or are I'm completly wrong ?
From the message you linked to:
"If your app is exiting, just exit, dbus_shutdown() is pointless."
I say the same about service names.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic