chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbd3733
)
dbus: no sync D-Bus connection flushing
author
Michal Schmidt
<mschmidt@redhat.com>
Mon, 19 Dec 2011 17:32:10 +0000
(18:32 +0100)
committer
Michal Schmidt
<mschmidt@redhat.com>
Mon, 19 Dec 2011 23:23:51 +0000
(
00:23
+0100)
Blocking on D-Bus in a system manager could lead to deadlock.
src/dbus.c
patch
|
blob
|
history
diff --git
a/src/dbus.c
b/src/dbus.c
index 81b4f53434666e8840a655f2a4435a4101fedc39..f9250f13544fde91ab5bfaf309f26b70ffd45410 100644
(file)
--- a/
src/dbus.c
+++ b/
src/dbus.c
@@
-1196,7
+1196,9
@@
static void shutdown_connection(Manager *m, DBusConnection *c) {
}
dbus_connection_set_dispatch_status_function(c, NULL, NULL, NULL);
- dbus_connection_flush(c);
+ /* system manager cannot afford to block on DBus */
+ if (m->running_as != MANAGER_SYSTEM)
+ dbus_connection_flush(c);
dbus_connection_close(c);
dbus_connection_unref(c);
}