aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nptl/pthread_create.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 5680687..b7073a8 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -83,9 +83,12 @@ late_init (void)
(void) __libc_sigaction (SIGCANCEL, &sa, NULL);
}
- /* Install the handle to change the threads' uid/gid. */
+ /* Install the handle to change the threads' uid/gid. Use
+ SA_ONSTACK because the signal may be sent to threads that are
+ running with custom stacks. (This is less likely for
+ SIGCANCEL.) */
sa.sa_sigaction = __nptl_setxid_sighandler;
- sa.sa_flags = SA_SIGINFO | SA_RESTART;
+ sa.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_RESTART;
(void) __libc_sigaction (SIGSETXID, &sa, NULL);
/* The parent process might have left the signals blocked. Just in