mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +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:
parent
cd189999d1
commit
edbffb3c7a
4 changed files with 13 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue