aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/ChangeLog6
-rw-r--r--linuxthreads/signals.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index ebad33038b..6f579267cd 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,9 @@
+2001-04-16 Ulrich Drepper <drepper@redhat.com>
+
+ * signals.c (sigwait): NSIG is no signal number. Block all
+ signals while in signal handler for signals in SET.
+ Patch by Manfred Spraul <manfred@colorfullife.com>.
+
2001-04-12 Ulrich Drepper <drepper@redhat.com>
* tst-cancel.c: Disable most tests. Add new test where all
diff --git a/linuxthreads/signals.c b/linuxthreads/signals.c
index 714e346fab..8a0dabf0e3 100644
--- a/linuxthreads/signals.c
+++ b/linuxthreads/signals.c
@@ -188,7 +188,7 @@ int sigwait(const sigset_t * set, int * sig)
signals in set is unspecified." */
sigfillset(&mask);
sigdelset(&mask, __pthread_sig_cancel);
- for (s = 1; s <= NSIG; s++) {
+ for (s = 1; s < NSIG; s++) {
if (sigismember(set, s) &&
s != __pthread_sig_restart &&
s != __pthread_sig_cancel &&
@@ -198,7 +198,7 @@ int sigwait(const sigset_t * set, int * sig)
sighandler[s].old == (arch_sighandler_t) SIG_DFL ||
sighandler[s].old == (arch_sighandler_t) SIG_IGN) {
sa.sa_handler = pthread_null_sighandler;
- sigemptyset(&sa.sa_mask);
+ sigfillset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(s, &sa, NULL);
}