summaryrefslogtreecommitdiff
path: root/src/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-04-28 22:07:01 +0200
committerLennart Poettering <lennart@poettering.net>2011-04-28 22:07:01 +0200
commitb23de6af893c11da4286bc416455cd0926d1532e (patch)
treee2a7e00fcedc9b8314b7035f3a4fdb6eca05bead /src/systemctl.c
parentb4bd51448fa8b7574e9a92af50b58da9bb0dfb5e (diff)
dbus: make daemon reexecution synchronous
We simply keep open copies of the dbus connections across the reexecution and close them as last step of it. A client can thus simply wait until its connection is dropped to know when the reexecution is finished. https://bugzilla.redhat.com/show_bug.cgi?id=698198
Diffstat (limited to 'src/systemctl.c')
-rw-r--r--src/systemctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c
index 10c6319b4..99ada3830 100644
--- a/src/systemctl.c
+++ b/src/systemctl.c
@@ -3323,6 +3323,13 @@ static int daemon_reload(DBusConnection *bus, char **args, unsigned n) {
goto finish;
}
+ if (streq(method, "Reexecute") && dbus_error_has_name(&error, DBUS_ERROR_NO_REPLY)) {
+ /* On reexecution, we expect a disconnect, not
+ * a reply */
+ r = 0;
+ goto finish;
+ }
+
log_error("Failed to issue method call: %s", bus_error_message(&error));
r = -EIO;
goto finish;