]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: Make sure iterations of defer and exit sources are updated
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 13 Nov 2025 21:15:01 +0000 (22:15 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 14 Nov 2025 10:38:59 +0000 (11:38 +0100)
commita3dd54c097d5bc50e61e2ff1b7f8ff55e3234255
tree17073e26fe3387b935c428b4233696ef61ab1dd3
parent5a5cb6ba50594355734ff58487d2272a86b741b1
sd-event: Make sure iterations of defer and exit sources are updated

Defer and exit event sources are marked pending once when they are added
and never again afterwards. This means their pending_iteration is never
incremented after they are initially added, which breaks fairness among
event sources with equal priority which depend on the pending_iteration
variable getting updated in source_set_pending(). To fix this, let's assign
iterations for defer and exit sources in source_dispatch() instead so that
those get their pending_iteration updated as well.
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-event/test-event.c