* 0595f9a1c182a84581749823ef47c5f292e545f9 is borked, freezes shutdown
(path: after installing inotify watches, recheck file again to fix race)
+* move systemadm man page to systemd-gtk
+ https://bugzilla.redhat.com/show_bug.cgi?id=699394
+
F15 External:
* NFS, networkmanager ordering issue (PENDING)
Features:
+* drop /.readahead on bigger upgrades with yum
+
+* add inode stat() check to readahead
+
* plymouth.enable=0
* introduce dbus calls for enabling/disabling a service
* rename systemd-logger to systemd-stdio-syslog-bridge
-* introduce /usr/lib/binfmt.d/, /usr/lib/tmpfiles.d/
-
* take BSD file lock on tty devices when using them?
* avoid any flag files, or readahead files in /, we need to support r/o /
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Reexecute")) {
- if (!(reply = dbus_message_new_method_return(message)))
- goto oom;
+ /* We don't send a reply back here, the client should
+ * just wait for us disconnecting. */
m->exit_code = MANAGER_REEXECUTE;
static int request_name(Manager *m) {
const char *name = "org.freedesktop.systemd1";
- uint32_t flags = 0;
+ /* Allow replacing of our name, to ease implementation of
+ * reexecution, where we keep the old connection open until
+ * after the new connection is set up and the name installed
+ * to allow clients to synchronously wait for reexecution to
+ * finish */
+ uint32_t flags = DBUS_NAME_FLAG_ALLOW_REPLACEMENT|DBUS_NAME_FLAG_REPLACE_EXISTING;
DBusMessage *message = NULL;
DBusPendingCall *pending = NULL;
return !set_isempty(BUS_CONNECTION_SUBSCRIBED(m, c));
}
+
+int bus_fdset_add_all(Manager *m, FDSet *fds) {
+ Iterator i;
+ DBusConnection *c;
+
+ assert(m);
+ assert(fds);
+
+ /* When we are about to reexecute we add all D-Bus fds to the
+ * set to pass over to the newly executed systemd. They won't
+ * be used there however, except that they are closed at the
+ * very end of deserialization, those making it possible for
+ * clients to synchronously wait for systemd to reexec buy
+ * simply waiting for disconnection */
+
+ SET_FOREACH(c, m->bus_connections_for_dispatch, i) {
+ int fd;
+
+ if (dbus_connection_get_unix_fd(c, &fd)) {
+ fd = fdset_put_dup(fds, fd);
+
+ if (fd < 0)
+ return fd;
+ }
+ }
+
+ SET_FOREACH(c, m->bus_connections, i) {
+ int fd;
+
+ if (dbus_connection_get_unix_fd(c, &fd)) {
+ fd = fdset_put_dup(fds, fd);
+
+ if (fd < 0)
+ return fd;
+ }
+ }
+
+ return 0;
+}
bool bus_has_subscriber(Manager *m);
bool bus_connection_has_subscriber(Manager *m, DBusConnection *c);
+int bus_fdset_add_all(Manager *m, FDSet *fds);
+
#define BUS_CONNECTION_SUBSCRIBED(m, c) dbus_connection_get_data((c), (m)->subscribed_data_slot)
#define BUS_PENDING_CALL_NAME(m, p) dbus_pending_call_get_data((p), (m)->name_data_slot)
* here, so that the EBADFD that valgrind will return
* us on close() doesn't influence us */
- /* log_warning("Closing left-over fd %i", PTR_TO_FD(p)); */
+ log_debug("Closing left-over fd %i", PTR_TO_FD(p));
close_nointr(PTR_TO_FD(p));
}
if (ferror(f))
return -EIO;
+ r = bus_fdset_add_all(m, fds);
+ if (r < 0)
+ return r;
+
return 0;
}
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;