sd-bus: handle -EINTR return from bus_poll()
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Nov 2022 16:42:04 +0000 (17:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 22 Nov 2022 12:06:50 +0000 (13:06 +0100)
commit3022916b4d2483452c3ddbbac9ee7c4372b1cb46
tree30ff35a253e25cde4151287f6098dedeb0a96358
parent108dfff2c7aebadb78e485ed564caf559367bf7c
sd-bus: handle -EINTR return from bus_poll()

In sd_bus_wait(), let's convert EINTR to a return code of 0, thus asking
the caller do loop again and enter sd_bus_process() again (which will
not find any queued events). This way we'll not return an error on
something that isn't really an error. This should typically make sure
things are properly handled by the caller, magically, without eating up
the event entirely, and still giving the caller time to run some code if
they want.
src/libsystemd/sd-bus/bus-socket.c
src/libsystemd/sd-bus/sd-bus.c