1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Kernel: Don't resume thread into Running state directly on SIGCONT

We should never resume a thread by directly setting it to Running state.
Instead, if a thread was in Running state when stopped, record the state
as Runnable.

Fixes #4150
This commit is contained in:
Tom 2020-11-23 10:09:56 -07:00 committed by Andreas Kling
parent dfce9051fa
commit 97b3035c14
Notes: sideshowbarker 2024-07-19 01:17:55 +09:00

View file

@ -817,7 +817,8 @@ void Thread::set_state(State new_state)
}
if (new_state == Stopped) {
m_stop_state = m_state;
// We don't want to restore to Running state, only Runnable!
m_stop_state = m_state != Running ? m_state : Runnable;
}
m_state = new_state;