mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:15:07 +00:00
Kernel: Rename Process::create() => try_create()
This commit is contained in:
parent
1814f66c63
commit
5e2e17c38c
3 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue