]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-event: support callback=NULL in IO/child/inotify/defer event sources, too
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Oct 2020 07:51:36 +0000 (09:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Oct 2020 07:40:16 +0000 (09:40 +0200)
commitb9350e70aa050d97c47ff59994e84fa8c3de4738
tree467bb5ba1acd7393c22cab9c002955d560b5a9b3
parentbac0bfc1d0ee1e57055dffb78c77a1ee021ce536
sd-event: support callback=NULL in IO/child/inotify/defer event sources, too

Also, document this functionality more prominently, including with a
reference from sd_event_exit().

This is mostly to make things complete, as previously we supported NULL
callbacks only in _add_time() and _add_signal(). However, I think this
makes snese for IO event sources too (think: when some fd such as a pipe
end sees SIGHUP or so, exit), as well as defer or post event sources (i.e. exit
once we got nothing else to do). This also adds support for inotify
event sources, simply to complete things (I can't see the immediate use,
but maybe someone else comes up with it).

The only event source type that doesn't allow callback=NULL now are exit
callbacks, but for them they make little sense, as the event loop is
exiting then anyway.
man/sd_event_add_child.xml
man/sd_event_add_defer.xml
man/sd_event_add_inotify.xml
man/sd_event_add_io.xml
man/sd_event_add_signal.xml
man/sd_event_add_time.xml
man/sd_event_exit.xml
src/libsystemd/sd-event/sd-event.c