diff options
Diffstat (limited to 'src/core/swap.c')
-rw-r--r-- | src/core/swap.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/swap.c b/src/core/swap.c index fff613934a..adcf78b717 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -1238,6 +1238,13 @@ static int swap_enumerate(Manager *m) { 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); |