if (r < 0)
return r;
+ /* Process signals a bit earlier than the rest of things */
+ r = sd_event_source_set_priority(m->signal_event_source, -5);
+ if (r < 0)
+ return r;
+
if (m->running_as == SYSTEMD_SYSTEM)
return enable_special_signals(m);
r = sd_event_add_io(m->event, fileno(m->proc_self_mountinfo), EPOLLPRI, mount_dispatch_io, m, &m->mount_event_source);
if (r < 0)
goto fail;
+
+ /* Dispatch this before we dispatch SIGCHLD, so that
+ * we always get the events from /proc/self/mountinfo
+ * before the SIGCHLD of /bin/mount. */
+ r = sd_event_source_set_priority(m->mount_event_source, -10);
+ if (r < 0)
+ goto fail;
}
r = mount_load_proc_self_mountinfo(m, false);
r = sd_event_add_io(m->event, fileno(m->proc_swaps), EPOLLPRI, swap_dispatch_io, m, &m->swap_event_source);
if (r < 0)
goto fail;
+
+ /* Dispatch this before we dispatch SIGCHLD, so that
+ * we always get the events from /proc/swaps before
+ * the SIGCHLD of /sbin/swapon. */
+ r = sd_event_source_set_priority(m->swap_event_source, -10);
+ if (r < 0)
+ goto fail;
}
r = swap_load_proc_swaps(m, false);