Killing of deamon
Havoc Pennington
hp at pobox.com
Tue May 6 09:39:16 PDT 2008
Hi,
On Tue, May 6, 2008 at 11:28 AM, John (J5) Palmieri <johnp at redhat.com> wrote:
> However in your own application you can set use the
> dbus_connection_set_exit_on_disconnect API. Note that D-Bus is often
> used for session management so if you do set this and the session exits
> there is a chance your app won't depending on how it was launched.
>
I'd go one notch further; for the session bus in a normal Linux or
UNIX desktop session, if an app does not exit on bus disconnect, it's
a bug in the app.
It is OK to set_exit_on_disconnect(FALSE) and exit in your own way if
you want, but it's a bug if you don't exit.
For the system bus or your own custom bus, if you want to try to
handle bus restarts, then go for it. But for a normal desktop session
I think the bus disappearing *means* the session is over, the user is
logging out, and if you don't exit you are going to mess things up by
continuing to run with nobody logged in. Which breaks in various
scenarios (e.g. automount).
So the "spec" or "contract" is: on disconnect from desktop session
bus, you MUST exit.
Havoc
More information about the dbus
mailing list