git-timer_create_sigmask
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
committerSamuel Thibault <sthibault@debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
===================================================================

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-timer_create_sigmask.diff

sysdeps/pthread/timer_routines.c

index f059beb4c5d6b20f38372d8d7f21c53c0db6317b..e232220aca19941d58d1c48e0cc9850d5006041c 100644 (file)
@@ -460,10 +460,14 @@ int
 __timer_thread_start (struct thread_node *thread)
 {
   int retval = 1;
+  sigset_t set, oset;
 
   assert (!thread->exists);
   thread->exists = 1;
 
+  sigfillset (&set);
+  pthread_sigmask (SIG_SETMASK, &set, &oset);
+
   if (pthread_create (&thread->id, &thread->attr,
                      (void *(*) (void *)) thread_func, thread) != 0)
     {
@@ -471,6 +475,8 @@ __timer_thread_start (struct thread_node *thread)
       retval = -1;
     }
 
+  pthread_sigmask (SIG_SETMASK, &oset, NULL);
+
   return retval;
 }