summaryrefslogtreecommitdiff
path: root/Kernel/Thread.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-01 15:14:17 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-01 15:14:17 +0100
commit2839bb0be1fcf4e405b30b9fb35bdd31f40b5cbd (patch)
tree971be7fd28f8a0f73e3155b402949adc45dbeb25 /Kernel/Thread.h
parentfbe9aad70afed33a59cd9e8d2228ebabaf7b6797 (diff)
downloadserenity-2839bb0be1fcf4e405b30b9fb35bdd31f40b5cbd.zip
Kernel: Restore the previous thread state on SIGCONT after SIGSTOP
When stopping a thread with the SIGSTOP signal, we now store the thread state in Thread::m_stop_state. That state is then restored on SIGCONT. This fixes an issue where previously-blocked threads would unblock upon resume. Now they simply resume in the Blocked state, and it's up to the regular unblocking mechanism to unblock them. Fixes #1326.
Diffstat (limited to 'Kernel/Thread.h')
-rw-r--r--Kernel/Thread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 4737056a40..f59aeee95b 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -486,6 +486,7 @@ private:
u32 m_priority_boost { 0 };
u8 m_stop_signal { 0 };
+ State m_stop_state { Invalid };
bool m_dump_backtrace_on_finalization { false };
bool m_should_die { false };