]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-event: make sd_event_prepare() return positive when buffered inotify data exists
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Jun 2022 21:42:22 +0000 (06:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jun 2022 15:05:14 +0000 (00:05 +0900)
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.

src/libsystemd/sd-event/sd-event.c

index 78b4351c2a3977f90c83c8e4a1301731bbf85756..a37147d1d550555f94eecc040831c5592eaa9002 100644 (file)
@@ -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;