Commit 73ec2987 authored by Samuel Thibault's avatar Samuel Thibault

hurd: fix interaction between SIGCHLD and timer_create

hurd-i386/git-timer_create_sigmask.diff
Closes: Bug#882238.
parent cc34de8f
......@@ -2,6 +2,8 @@ glibc (2.27-4) UNRELEASED; urgency=medium
[ Samuel Thibault ]
* hurd-i386/tg-gsync-libc.diff: Rename to hurd-i386/git-gsync-libc.diff.
* hurd-i386/git-timer_create_sigmask.diff: New patch to fix interaction
between SIGCHLD and timer_create. Closes: Bug#882238.
-- Samuel Thibault <sthibault@debian.org> Thu, 29 Mar 2018 22:33:14 +0200
......
Index: glibc-2.27/sysdeps/pthread/timer_routines.c
===================================================================
--- glibc-2.27.orig/sysdeps/pthread/timer_routines.c
+++ glibc-2.27/sysdeps/pthread/timer_routines.c
@@ -463,10 +463,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)
{
@@ -474,6 +478,8 @@ __timer_thread_start (struct thread_node
retval = -1;
}
+ pthread_sigmask (SIG_SETMASK, &oset, NULL);
+
return retval;
}
......@@ -120,6 +120,7 @@ hurd-i386/git-libpthread-trylock.diff
hurd-i386/git-test-atexit-race-common.diff
hurd-i386/git-UTIME.diff
#hurd-i386/libpthread_sigs.diff
hurd-i386/git-timer_create_sigmask.diff
i386/local-biarch.diff
i386/unsubmitted-quiet-ldconfig.diff
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment