rtld - Add fork hooks for libthread_xu to install

Operating Systems / DragonFlyBSD - Matthew Dillon [apollo.backplane.com] - 2 November 2017 00:15 EDT

- Add fork hooks for libthread_xu to install. rtld must acquire its locks exclusively during a fork, and then release them after the fork is complete, to prevent the fork() from catching the locks in a bad state. See libthread_xu.

e19be507c3 rtld - Add fork hooks for libthread_xu to install
lib/libc/sysvipc/sem.c | 18 +++++++++++-----
lib/libthread_xu/thread/thr_join.c | 3 +++
lib/libthread_xu/thread/thr_umtx.c | 39 ++++++++++++++++++++++-----------
libexec/rtld-elf/Symbol.map | 3 +++
libexec/rtld-elf/rtld_lock.c | 44 ++++++++++++++++++++++++++++++++------
libexec/rtld-elf/rtld_lock.h | 6 +++++-
6 files changed, 88 insertions(+), 25 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share