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:
parent
dfce9051fa
commit
97b3035c14
Notes:
sideshowbarker
2024-07-19 01:17:55 +09:00
Author: https://github.com/tomuta
Commit: 97b3035c14
Pull-request: https://github.com/SerenityOS/serenity/pull/4152
Issue: https://github.com/SerenityOS/serenity/issues/4150
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue