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

UserspaceEmulator: Implement the fork() syscall :^)

This commit is contained in:
Andreas Kling 2020-07-27 18:05:20 +02:00
parent 7bb6b1d44d
commit b9b74e355a
2 changed files with 8 additions and 1 deletions

View file

@ -349,7 +349,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
return virt$clock_gettime(arg1, arg2);
case SC_getrandom:
return virt$getrandom(arg1, arg2, arg3);
case SC_fork:
return virt$fork();
default:
dbg() << "Unimplemented syscall: " << Syscall::to_string((Syscall::Function)function);
dump_backtrace();
@ -866,4 +867,9 @@ int Emulator::virt$ioctl(int fd, unsigned request, FlatPtr arg)
TODO();
}
int Emulator::virt$fork()
{
return fork();
}
}