1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

Kernel: Move process termination status/signal into protected data

This commit is contained in:
Andreas Kling 2021-03-11 14:24:08 +01:00
parent 4916b5c130
commit 1608ef37d8
3 changed files with 16 additions and 7 deletions

View file

@ -31,8 +31,11 @@ namespace Kernel {
void Process::sys$exit(int status)
{
m_termination_status = status;
m_termination_signal = 0;
{
ProtectedDataMutationScope scope { *this };
m_termination_status = status;
m_termination_signal = 0;
}
die();
Thread::current()->die_if_needed();
VERIFY_NOT_REACHED();