summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-05-14 10:22:10 +0000
committerEric Andersen <andersen@codepoet.org>2004-05-14 10:22:10 +0000
commit5f2bd77887a3163c5d82fe6abf17662f9c863cbd (patch)
tree475c682c1d45a06790bdcc84d21c495c9284ff6a /libpthread/linuxthreads
parentea8e5273424c69938094e0b0e3fdd5790df39393 (diff)
Alexandre Oliva writes:
A program that requests __pthread_sig_debug to be blocked will self-deadlock when it requests a thread to be created, because the debugger (rda or gdb) will never get the signal, so it won't wake up the pthread manager as expected. This patch fixes it.
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r--libpthread/linuxthreads/signals.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/signals.c b/libpthread/linuxthreads/signals.c
index 7cb6d3c57..df15b884e 100644
--- a/libpthread/linuxthreads/signals.c
+++ b/libpthread/linuxthreads/signals.c
@@ -38,9 +38,13 @@ int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
case SIG_SETMASK:
sigaddset(&mask, __pthread_sig_restart);
sigdelset(&mask, __pthread_sig_cancel);
+ if (__pthread_sig_debug > 0)
+ sigdelset(&mask, __pthread_sig_debug);
break;
case SIG_BLOCK:
sigdelset(&mask, __pthread_sig_cancel);
+ if (__pthread_sig_debug > 0)
+ sigdelset(&mask, __pthread_sig_debug);
break;
case SIG_UNBLOCK:
sigdelset(&mask, __pthread_sig_restart);