From 026a6bdd0ecdc68288b2167aed6dfd4e6f407edb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 Jul 2008 01:25:33 +0200 Subject: Work around D-Bus bug that involves dbus_shutdown() to call exit() when it shouldn't. Patch from Coling Guthrie --- src/daemon/polkit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/daemon/polkit.c') diff --git a/src/daemon/polkit.c b/src/daemon/polkit.c index 256e3199..dc0eee78 100644 --- a/src/daemon/polkit.c +++ b/src/daemon/polkit.c @@ -54,6 +54,11 @@ int pa_polkit_check(const char *action_id) { goto finish; } + /* There seems to be a bug in D-Bus that causes dbus_shutdown() to + * call exit() when a connection without this flag disabled was + * created during runtime.*/ + dbus_connection_set_exit_on_disconnect(bus, FALSE); + if (!(caller = polkit_caller_new_from_pid(bus, getpid(), &dbus_error))) { pa_log_error("Cannot get caller from PID: %s", dbus_error.message); goto finish; -- cgit From 4ccbc4dbe27b286b548ad27435c390131075fc8b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 31 Jul 2008 21:22:43 +0200 Subject: reword comment on dbus a bit --- src/daemon/polkit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/daemon/polkit.c') diff --git a/src/daemon/polkit.c b/src/daemon/polkit.c index dc0eee78..08155cf2 100644 --- a/src/daemon/polkit.c +++ b/src/daemon/polkit.c @@ -54,9 +54,9 @@ int pa_polkit_check(const char *action_id) { goto finish; } - /* There seems to be a bug in D-Bus that causes dbus_shutdown() to - * call exit() when a connection without this flag disabled was - * created during runtime.*/ + /* There seems to be a bug in some versions of D-Bus that causes + * dbus_shutdown() to call exit() when a connection without this + * flag disabled was created during runtime.*/ dbus_connection_set_exit_on_disconnect(bus, FALSE); if (!(caller = polkit_caller_new_from_pid(bus, getpid(), &dbus_error))) { -- cgit