mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
hurd: avoid letting signals go to thread created by timer_create
* sysdeps/pthread/timer_routines.c (__timer_thread_start): Block all signals in thread created for runing timers.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2018-04-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
|
* sysdeps/pthread/timer_routines.c (__timer_thread_start): Block all
|
||||||
|
signals in thread created for runing timers.
|
||||||
|
|
||||||
2018-04-01 Florian Weimer <fweimer@redhat.com>
|
2018-04-01 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* support/support_format_addrinfo.c (support_format_addrinfo):
|
* support/support_format_addrinfo.c (support_format_addrinfo):
|
||||||
|
@@ -463,10 +463,14 @@ int
|
|||||||
__timer_thread_start (struct thread_node *thread)
|
__timer_thread_start (struct thread_node *thread)
|
||||||
{
|
{
|
||||||
int retval = 1;
|
int retval = 1;
|
||||||
|
sigset_t set, oset;
|
||||||
|
|
||||||
assert (!thread->exists);
|
assert (!thread->exists);
|
||||||
thread->exists = 1;
|
thread->exists = 1;
|
||||||
|
|
||||||
|
sigfillset (&set);
|
||||||
|
pthread_sigmask (SIG_SETMASK, &set, &oset);
|
||||||
|
|
||||||
if (pthread_create (&thread->id, &thread->attr,
|
if (pthread_create (&thread->id, &thread->attr,
|
||||||
(void *(*) (void *)) thread_func, thread) != 0)
|
(void *(*) (void *)) thread_func, thread) != 0)
|
||||||
{
|
{
|
||||||
@@ -474,6 +478,8 @@ __timer_thread_start (struct thread_node *thread)
|
|||||||
retval = -1;
|
retval = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pthread_sigmask (SIG_SETMASK, &oset, NULL);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user