mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:27:42 +00:00
Kernel: Make cloning of FileDescriptions OOM safe
This commit is contained in:
parent
e7fb70b05c
commit
296452a981
2 changed files with 13 additions and 5 deletions
|
@ -25,7 +25,10 @@ KResultOr<FlatPtr> Process::sys$fork(RegisterState& regs)
|
|||
child->m_root_directory_relative_to_global_root = m_root_directory_relative_to_global_root;
|
||||
child->m_veil_state = m_veil_state;
|
||||
child->m_unveiled_paths = m_unveiled_paths.deep_copy();
|
||||
child->m_fds = m_fds;
|
||||
|
||||
if (auto result = child->m_fds.try_clone(m_fds); result.is_error())
|
||||
return result.error();
|
||||
|
||||
child->m_pg = m_pg;
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue