mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Kernel: Move process termination status/signal into protected data
This commit is contained in:
parent
4916b5c130
commit
1608ef37d8
3 changed files with 16 additions and 7 deletions
|
@ -334,7 +334,10 @@ void Process::crash(int signal, u32 eip, bool out_of_memory)
|
|||
}
|
||||
dump_backtrace();
|
||||
}
|
||||
m_termination_signal = signal;
|
||||
{
|
||||
ProtectedDataMutationScope scope { *this };
|
||||
m_termination_signal = signal;
|
||||
}
|
||||
set_dump_core(!out_of_memory);
|
||||
space().dump_regions();
|
||||
VERIFY(is_user_process());
|
||||
|
@ -578,8 +581,11 @@ void Process::terminate_due_to_signal(u8 signal)
|
|||
VERIFY(signal < 32);
|
||||
VERIFY(Process::current() == this);
|
||||
dbgln("Terminating {} due to signal {}", *this, signal);
|
||||
m_termination_status = 0;
|
||||
m_termination_signal = signal;
|
||||
{
|
||||
ProtectedDataMutationScope scope { *this };
|
||||
m_termination_status = 0;
|
||||
m_termination_signal = signal;
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue