1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

Kernel: Protect Process::m_name with a spinlock

This also lets us remove the `get_process_name` and `set_process_name`
syscalls from the big lock. :^)
This commit is contained in:
Sam Atkins 2023-02-04 13:01:46 +00:00 committed by Andreas Kling
parent b26ecca970
commit fe7b08dad7
13 changed files with 102 additions and 42 deletions

View file

@ -27,7 +27,7 @@ ErrorOr<FlatPtr> Process::sys$fork(RegisterState& regs)
}
};
auto child_name = TRY(m_name->try_clone());
auto child_name = TRY(name().with([](auto& name) { return name->try_clone(); }));
auto credentials = this->credentials();
auto child = TRY(Process::try_create(child_first_thread, move(child_name), credentials->uid(), credentials->gid(), pid(), m_is_kernel_process, current_directory(), executable(), m_tty, this));