chiark / gitweb /
sd-event: don't touch fd's accross forks
authorTom Gundersen <teg@jklm.no>
Thu, 4 Jun 2015 14:54:45 +0000 (16:54 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:47 +0000 (10:01 +0100)
commit14628e578fa89aebb6386c6c3a0970292913de29
tree49e0d500714990e231d451ad25ca66c01763e96b
parent7b2e8dae408423e052caee0c448de5a1b5908676
sd-event: don't touch fd's accross forks

We protect most of the API from use accross forks, but we still allow both
sd_event and sd_event_source objects to be unref'ed. This would cause
problems as it would unregister sources from the underlying eventfd, hence
also affecting the original instance in the parent process.

This fixes the issue by not touching the fds on unref when done accross a fork,
but still free the memory.

This fixes a regression introduced by
        "udevd: move main-loop to sd-event": 693d371d30fee

where the worker processes were disabling the inotify event source in the
main daemon.
src/libelogind/sd-event/sd-event.c