1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

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.

(cherry picked from commit 067fc917026fd1fe601de0198c5ea7b3ba782d1e)
(cherry picked from commit 632ba5b2f09646152feef0182cc94fe1b05e15ed)
This commit is contained in:
Yu Watanabe 2022-06-26 06:42:22 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 29e3dc0dfd
commit 2e54ed4043

View File

@ -3880,7 +3880,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;