1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

Kernel: Allocate new main thread stack before committing to exec

If the allocation fails (e.g ENOMEM) we want to simply return an error
from sys$execve() and continue executing the current executable.

This patch also moves make_userspace_stack_for_main_thread() out of the
Thread class since it had nothing in particular to do with Thread.
This commit is contained in:
Andreas Kling 2020-12-25 16:20:26 +01:00
parent d55fb7b5e2
commit 89d3b09638
4 changed files with 77 additions and 77 deletions

View file

@ -975,8 +975,6 @@ public:
void set_default_signal_dispositions();
bool push_value_on_stack(FlatPtr);
KResultOr<u32> make_userspace_stack_for_main_thread(Vector<String> arguments, Vector<String> environment, Vector<ELF::AuxiliaryValue>);
KResult make_thread_specific_region(Badge<Process>);
unsigned syscall_count() const { return m_syscall_count; }