UserspaceEmulator: Implement virt$getppid

This commit is contained in:
Rummskartoffel 2022-01-27 23:55:12 +01:00 committed by Andreas Kling
parent 273f15e8ea
commit 33b4b86141
Notes: sideshowbarker 2024-07-17 22:09:47 +09:00
2 changed files with 8 additions and 0 deletions

View file

@ -170,6 +170,7 @@ private:
int virt$getpgid(pid_t);
int virt$getpgrp();
u32 virt$getpid();
pid_t virt$getppid();
ssize_t virt$getrandom(FlatPtr buffer, size_t buffer_size, unsigned int flags);
int virt$getsid(pid_t);
int virt$getsockname(FlatPtr);

View file

@ -121,6 +121,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
return virt$getpgrp();
case SC_getpid:
return virt$getpid();
case SC_getppid:
return virt$getppid();
case SC_getrandom:
return virt$getrandom(arg1, arg2, arg3);
case SC_getsid:
@ -973,6 +975,11 @@ u32 Emulator::virt$getpid()
return getpid();
}
pid_t Emulator::virt$getppid()
{
return getppid();
}
u32 Emulator::virt$pledge(u32)
{
return 0;