mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Kernel: Unblock SignalBlocker if a signal was just unmarked as pending
When updating the signal mask, there is a small frame where we might set up the receiving process for handing the signal and therefore remove that signal from the list of pending signals before SignalBlocker has a chance to block. In turn, this might cause SignalBlocker to never notice that the signal arrives and it will never unblock once blocked. Track the currently handled signal separately and include it when determining if SignalBlocker should be unblocking.
This commit is contained in:
committed by
Brian Gianforcaro
parent
cd189999d1
commit
edbffb3c7a
@@ -1052,6 +1052,8 @@ DispatchSignalResult Thread::dispatch_signal(u8 signal)
|
||||
|
||||
ScopedAddressSpaceSwitcher switcher(m_process);
|
||||
|
||||
m_currently_handled_signal = signal;
|
||||
|
||||
u32 old_signal_mask = m_signal_mask;
|
||||
u32 new_signal_mask = m_signal_action_masks[signal].value_or(action.mask);
|
||||
if ((action.flags & SA_NODEFER) == SA_NODEFER)
|
||||
|
||||
Reference in New Issue
Block a user