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

Kernel: Pass new region owner to Region::clone

This commit is contained in:
Tom 2021-01-01 00:02:40 -07:00 committed by Andreas Kling
parent a0c91719d8
commit 2f429bd2d5
3 changed files with 6 additions and 6 deletions

View file

@ -88,7 +88,7 @@ pid_t Process::sys$fork(RegisterState& regs)
#ifdef FORK_DEBUG
dbg() << "fork: cloning Region{" << &region << "} '" << region.name() << "' @ " << region.vaddr();
#endif
auto region_clone = region.clone();
auto region_clone = region.clone(*child);
if (!region_clone) {
dbg() << "fork: Cannot clone region, insufficient memory";
// TODO: tear down new process?