-
Since glibc 2.28, calling pthread_atfork() over the context of a fork handler hangs, due to unexpected recursive locking on a common lock both want to acquire. To fix this, the cobalt fork handler needs to be registered outside of the atfork handling context it installs. At this chance, group all base inits which do not need to be reiterated in the forkee to exclude them from the atfork context. The problematic change was introduced between glibc-2.27.9000 and glibc-2.28 [1]; it triggered a bug in the glibc test suite [2]. [1] git://sourceware.org/git/glibc.git, 27761a104 [2] git://sourceware.org/git/glibc.git , 669ff911e Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
04e8e538