From: Yu Watanabe Date: Sat, 25 Jun 2022 21:42:22 +0000 (+0900) Subject: sd-event: make sd_event_prepare() return positive when buffered inotify data exists X-Git-Tag: v252-rc1~758^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=067fc917026fd1fe601de0198c5ea7b3ba782d1e;p=thirdparty%2Fsystemd.git sd-event: make sd_event_prepare() return positive when buffered inotify data exists Previously, even if there is buffered inotify data, sd_event_prepare() did not process the data when there is no pending event source. Fixes #23826. --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 78b4351c2a3..a37147d1d55 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3874,7 +3874,7 @@ _public_ int sd_event_prepare(sd_event *e) { event_close_inode_data_fds(e); - if (event_next_pending(e) || e->need_process_child) + if (event_next_pending(e) || e->need_process_child || !LIST_IS_EMPTY(e->inotify_data_buffered)) goto pending; e->state = SD_EVENT_ARMED;