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.
This commit is contained in:
Yu Watanabe
2022-06-28 00:05:14 +09:00
parent 32861b4c76
commit 067fc91702
+1 -1
View 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;