public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: Fix sigset of main thread
@ 2021-09-26  0:42 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2021-09-26  0:42 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=514638699d4b76826096a5f47136dc58f7619944

commit 514638699d4b76826096a5f47136dc58f7619944
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
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.

Diff:
---
 htl/pt-create.c | 7 +++++--
 1 file 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-26  0:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26  0:42 [glibc] htl: Fix sigset of main thread Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).