diff --git a/src/shared/daemon-util.c b/src/shared/daemon-util.c index e83ca8f663..85d9433626 100644 --- a/src/shared/daemon-util.c +++ b/src/shared/daemon-util.c @@ -56,6 +56,9 @@ int notify_push_fd(int fd, const char *name) { if (!state) return -ENOMEM; + /* Remove existing fds with the same name in fdstore. */ + (void) notify_remove_fd_warn(name); + return sd_pid_notify_with_fds(0, /* unset_environment = */ false, state, &fd, 1); } diff --git a/src/udev/udev-config.c b/src/udev/udev-config.c index 52855145da..ef0ee0abd6 100644 --- a/src/udev/udev-config.c +++ b/src/udev/udev-config.c @@ -553,9 +553,6 @@ int manager_serialize_config(Manager *manager) { if (r < 0) return log_warning_errno(r, "Failed to finalize serialization file: %m"); - /* Remove the previous serialization to make it replaced with the new one. */ - (void) notify_remove_fd_warn("config-serialization"); - r = notify_push_fd(fileno(f), "config-serialization"); if (r < 0) return log_warning_errno(r, "Failed to push serialization fd to service manager: %m");