]> git.ipfire.org Git - thirdparty/bind9.git/commit
Move the call_rcu_thread explicit create and shutdown to isc_loop
authorOndřej Surý <ondrej@isc.org>
Tue, 15 Apr 2025 21:04:14 +0000 (23:04 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 16 Apr 2025 10:30:14 +0000 (12:30 +0200)
commit30d49393822fd85173f730feedffd7c2cf5c5edc
tree757665ce579d0eec9c678a112e404f756bc867d2
parented8421f405a86700c08df424837f437e045848b7
Move the call_rcu_thread explicit create and shutdown to isc_loop

When isc__thread_initialize() is called from a library constructor, it
could be called before we fork the main process.  This happens with
named, and then we have the call_rcu_thread attached to the pre-fork
process and not the post-fork process, which means that the initial
process will never shutdown, because there's noone to tell it so.

Move the isc__thread_initialize() and isc__thread_shutdown() to the
isc_loop unit where we call it before creating the extra thread and
after joining all the extra threads respectively.
lib/isc/lib.c
lib/isc/loop.c