From: GNU Libc Maintainers Date: Sat, 27 Aug 2022 11:38:11 +0000 (+0100) Subject: git-htl-init_sigset X-Git-Tag: archive/raspbian/2.34-7+rpi1~1^2~90 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=175e4c5ed55569da98c4c23d3137fc78ffd84bba;p=glibc.git git-htl-init_sigset Committed for 2.35 commit 514638699d4b76826096a5f47136dc58f7619944 Author: Samuel Thibault Date: Sun Sep 26 02:40:26 2021 +0200 htl: Fix sigset of main thread d482ebfa6785 ('htl: Keep thread signals blocked during its initialization') fixed not letting signals get delivered too early during thread creation, but it also affected the main thread, thus making it block signals by default. We need to just let the main thread sigset as it is. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-htl-init_sigset.diff --- diff --git a/htl/pt-create.c b/htl/pt-create.c index f0a1f1ab0..b9cf2e1d6 100644 --- a/htl/pt-create.c +++ b/htl/pt-create.c @@ -213,8 +213,11 @@ __pthread_create_internal (struct __pthread **thread, err = __pthread_sigstate (_pthread_self (), 0, 0, &pthread->init_sigset, 0); assert_perror (err); - /* But block the signals for now, until the thread is fully initialized. */ - __sigfillset (&sigset); + if (start_routine) + /* But block the signals for now, until the thread is fully initialized. */ + __sigfillset (&sigset); + else + sigset = pthread->init_sigset; err = __pthread_sigstate (pthread, SIG_SETMASK, &sigset, 0, 1); assert_perror (err);