mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
Kernel: Rename Process::create() => try_create()
This commit is contained in:
@@ -156,7 +156,7 @@ RefPtr<Process> Process::create_user_process(RefPtr<Thread>& first_thread, const
|
||||
if (!cwd)
|
||||
cwd = VirtualFileSystem::the().root_custody();
|
||||
|
||||
auto process = Process::create(first_thread, parts.take_last(), uid, gid, parent_pid, false, move(cwd), nullptr, tty);
|
||||
auto process = Process::try_create(first_thread, parts.take_last(), uid, gid, parent_pid, false, move(cwd), nullptr, tty);
|
||||
if (!first_thread)
|
||||
return {};
|
||||
if (!process->m_fds.try_resize(process->m_fds.max_open())) {
|
||||
@@ -197,7 +197,7 @@ RefPtr<Process> Process::create_user_process(RefPtr<Thread>& first_thread, const
|
||||
|
||||
RefPtr<Process> Process::create_kernel_process(RefPtr<Thread>& first_thread, String&& name, void (*entry)(void*), void* entry_data, u32 affinity, RegisterProcess do_register)
|
||||
{
|
||||
auto process = Process::create(first_thread, move(name), UserID(0), GroupID(0), ProcessID(0), true);
|
||||
auto process = Process::try_create(first_thread, move(name), UserID(0), GroupID(0), ProcessID(0), true);
|
||||
if (!first_thread || !process)
|
||||
return {};
|
||||
first_thread->regs().set_ip((FlatPtr)entry);
|
||||
@@ -230,7 +230,7 @@ void Process::unprotect_data()
|
||||
});
|
||||
}
|
||||
|
||||
RefPtr<Process> Process::create(RefPtr<Thread>& first_thread, const String& name, UserID uid, GroupID gid, ProcessID ppid, bool is_kernel_process, RefPtr<Custody> cwd, RefPtr<Custody> executable, TTY* tty, Process* fork_parent)
|
||||
RefPtr<Process> Process::try_create(RefPtr<Thread>& first_thread, const String& name, UserID uid, GroupID gid, ProcessID ppid, bool is_kernel_process, RefPtr<Custody> cwd, RefPtr<Custody> executable, TTY* tty, Process* fork_parent)
|
||||
{
|
||||
auto space = Memory::AddressSpace::try_create(fork_parent ? &fork_parent->address_space() : nullptr);
|
||||
if (!space)
|
||||
|
||||
Reference in New Issue
Block a user