mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Kernel: Always protect process data immediately after construction
This commit is contained in:
parent
49a0f40ff0
commit
9853a9bc8a
|
@ -227,6 +227,9 @@ Process::Process(RefPtr<Thread>& first_thread, const String& name, uid_t uid, gi
|
|||
, m_tty(tty)
|
||||
, m_wait_block_condition(*this)
|
||||
{
|
||||
// Ensure that we protect the process data when exiting the constructor.
|
||||
ProtectedDataMutationScope scope { *this };
|
||||
|
||||
m_pid = allocate_pid();
|
||||
m_ppid = ppid;
|
||||
m_uid = uid;
|
||||
|
|
Loading…
Reference in a new issue