aboutsummaryrefslogtreecommitdiff
path: root/htl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-09-26 02:40:26 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-09-26 02:40:26 +0200
commit514638699d4b76826096a5f47136dc58f7619944 (patch)
treebaabd5b03763cde6c823038fa0bc8e1cfcc66802 /htl
parent1cc205c510dedb9795103e728e4b8aeee83cbd53 (diff)
downloadglibc-514638699d4b76826096a5f47136dc58f7619944.tar
glibc-514638699d4b76826096a5f47136dc58f7619944.tar.gz
glibc-514638699d4b76826096a5f47136dc58f7619944.tar.bz2
glibc-514638699d4b76826096a5f47136dc58f7619944.zip
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.
Diffstat (limited to 'htl')
-rw-r--r--htl/pt-create.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/htl/pt-create.c b/htl/pt-create.c
index a6c9ab3e93..d30c27fd36 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);