]> git.ipfire.org Git - thirdparty/bacula.git/commit
Extend lockmgr to allow the use of destructor in pthread_key_create()
authorAlain Spineux <alain@baculasystems.com>
Fri, 3 Sep 2021 15:07:18 +0000 (17:07 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:04 +0000 (09:03 +0100)
commitd56aa41a1af6acbc761cf73e2ea312697777bd3c
tree081622931e7469dd02d13d5c0d2178990d150a8e
parent0eb74570834112bf21076a21899bf631ba0b49a9
Extend lockmgr to allow the use of destructor in pthread_key_create()

- if a destructor use a lock then the lockmgr cannot find the thread
  (that is being destructed) anymore and fail to update the list
  for this thread.
- instead we check that we have a thread alive before to update it.
- TODO maybe we should also do the same check for other use of "self"
  in lockmgr.c
bacula/src/lib/lockmgr.c