diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-03-11 02:59:50 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-03-11 02:59:50 +0000 |
commit | b47a4be33ec42eb423369b77f6da7b572b07edb4 (patch) | |
tree | c28b73dc40a4a07a188972e792db22e3ade7eda9 /sys/kern/kern_thread.c | |
parent | 178970c2cc97ea4ea53737b4eace117920af55f9 (diff) | |
download | FreeBSD-src-b47a4be33ec42eb423369b77f6da7b572b07edb4.zip FreeBSD-src-b47a4be33ec42eb423369b77f6da7b572b07edb4.tar.gz |
Fix signal delivering bug for threaded process.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2c8e65f..2356372 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1601,14 +1601,12 @@ thread_userret(struct thread *td, struct trapframe *frame) mtx_lock_spin(&sched_lock); td->td_flags &= ~TDF_CAN_UNBIND; mtx_unlock_spin(&sched_lock); - if ((kg->kg_completed == NULL) && + if ((p->p_flag & PS_NEEDSIGCHK) == 0 && + (kg->kg_completed == NULL) && (td->td_upcall->ku_flags & KUF_DOUPCALL) == 0) { thread_update_usr_ticks(td, 0); - if (!(kg->kg_completed || - (td->td_upcall->ku_flags & KUF_DOUPCALL))) { - td->td_mailbox = NULL; - return (0); - } + td->td_mailbox = 0; + return (0); } error = thread_export_context(td); if (error) { |