From d73eb8c8ca16f7727c257f47a63ffdfdc4f5a3f2 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Wed, 20 Dec 2000 16:55:57 +0000 Subject: [PATCH] Enable check for pending signals after calling a signal handler. Restoration of a threads signal mask after invocation of a signal handler may allow pending signals to become deliverable. PR: 23647 --- lib/libc_r/uthread/uthread_kern.c | 3 +++ lib/libkse/thread/thr_kern.c | 3 +++ lib/libpthread/thread/thr_kern.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/lib/libc_r/uthread/uthread_kern.c b/lib/libc_r/uthread/uthread_kern.c index 01faecee7117..6f4bb6e787e0 100644 --- a/lib/libc_r/uthread/uthread_kern.c +++ b/lib/libc_r/uthread/uthread_kern.c @@ -90,6 +90,9 @@ _thread_kern_sched_frame(struct pthread_signal_frame *psf) /* Restore the signal frame: */ _thread_sigframe_restore(_thread_run, psf); + /* The signal mask was restored; check for any pending signals: */ + _thread_run->check_pending = 1; + /* Switch to the thread scheduler: */ ___longjmp(_thread_kern_sched_jb, 1); } diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index 01faecee7117..6f4bb6e787e0 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -90,6 +90,9 @@ _thread_kern_sched_frame(struct pthread_signal_frame *psf) /* Restore the signal frame: */ _thread_sigframe_restore(_thread_run, psf); + /* The signal mask was restored; check for any pending signals: */ + _thread_run->check_pending = 1; + /* Switch to the thread scheduler: */ ___longjmp(_thread_kern_sched_jb, 1); } diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index 01faecee7117..6f4bb6e787e0 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -90,6 +90,9 @@ _thread_kern_sched_frame(struct pthread_signal_frame *psf) /* Restore the signal frame: */ _thread_sigframe_restore(_thread_run, psf); + /* The signal mask was restored; check for any pending signals: */ + _thread_run->check_pending = 1; + /* Switch to the thread scheduler: */ ___longjmp(_thread_kern_sched_jb, 1); }