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

UserspaceEmulator: Add the setpgid syscall

This commit is contained in:
Andreas Kling 2020-08-07 16:34:37 +02:00
parent 2b3b83801b
commit 93b1e54237
2 changed files with 8 additions and 0 deletions

View file

@ -259,6 +259,8 @@ u32 Emulator::virt_syscall(u32 function, u32 arg1, u32 arg2, u32 arg3)
return virt$ttyname(arg1, arg2, arg3);
case SC_getpgrp:
return virt$getpgrp();
case SC_setpgid:
return virt$setpgid(arg1, arg2);
case SC_execve:
return virt$execve(arg1);
case SC_sleep:
@ -1267,6 +1269,11 @@ int Emulator::virt$getpgrp()
return syscall(SC_getpgrp);
}
int Emulator::virt$setpgid(pid_t pid, pid_t pgid)
{
return syscall(SC_setpgid, pid, pgid);
}
int Emulator::virt$ttyname(int fd, FlatPtr buffer, size_t buffer_size)
{
auto host_buffer = ByteBuffer::create_zeroed(buffer_size);