Skip to content

Commit

Permalink
UserspaceEmulator: Implement virt$getppid
Browse files Browse the repository at this point in the history
  • Loading branch information
Rummskartoffel authored and awesomekling committed Jan 29, 2022
1 parent 273f15e commit 33b4b86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Userland/DevTools/UserspaceEmulator/Emulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class Emulator {
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);
Expand Down
7 changes: 7 additions & 0 deletions Userland/DevTools/UserspaceEmulator/Emulator_syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -973,6 +975,11 @@ u32 Emulator::virt$getpid()
return getpid();
}

pid_t Emulator::virt$getppid()
{
return getppid();
}

u32 Emulator::virt$pledge(u32)
{
return 0;
Expand Down

0 comments on commit 33b4b86

Please sign in to comment.