We have to update the pending signals thread flag when restoring the
signal block mask when returning from a signal handler. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24064 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
23b95b112d
commit
bc2001bb39
@ -29,6 +29,8 @@ extern bool is_kill_signal_pending(void);
|
||||
extern int has_signals_pending(void *_thread);
|
||||
extern bool is_signal_blocked(int signal);
|
||||
|
||||
extern void update_current_thread_signals_flag();
|
||||
|
||||
extern int sigaction_etc(thread_id threadID, int signal,
|
||||
const struct sigaction *newAction, struct sigaction *oldAction);
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <arch_cpu.h>
|
||||
#include <debug.h>
|
||||
#include <kernel.h>
|
||||
#include <ksignal.h>
|
||||
#include <int.h>
|
||||
#include <thread.h>
|
||||
#include <tls.h>
|
||||
@ -546,7 +547,11 @@ arch_restore_signal_frame(void)
|
||||
atomic_or(&thread->flags, threadFlags
|
||||
& (THREAD_FLAGS_RESTART_SYSCALL | THREAD_FLAGS_64_BIT_SYSCALL_RETURN));
|
||||
|
||||
// TODO: Verify that just restoring the old signal mask is right! Bash for
|
||||
// instance changes the procmask in a signal handler. Those changes are
|
||||
// lost the way we do it.
|
||||
atomic_set(&thread->sig_block_mask, signalMask);
|
||||
update_current_thread_signals_flag();
|
||||
|
||||
frame->eip = regs.eip;
|
||||
frame->flags = regs.eflags;
|
||||
|
@ -197,7 +197,7 @@ update_thread_signals_flag(struct thread* thread)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
update_current_thread_signals_flag()
|
||||
{
|
||||
InterruptsSpinLocker locker(thread_spinlock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user