projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix race condition in rsyscall handler
[musl]
/
src
/
thread
/
pthread_create.c
diff --git
a/src/thread/pthread_create.c
b/src/thread/pthread_create.c
index
9df4f71
..
344b39f
100644
(file)
--- a/
src/thread/pthread_create.c
+++ b/
src/thread/pthread_create.c
@@
-85,7
+85,7
@@
static void rsyscall_handler(int sig, siginfo_t *si, void *ctx)
/* Threads which have already decremented themselves from the
* thread count must not increment rs.cnt or otherwise act. */
if (self->dead) {
-
__wait(&rs.hold, 0, 1, 1
);
+
sigaddset(&((ucontext_t *)ctx)->uc_sigmask, SIGSYSCALL
);
return;
}