diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-07 16:34:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-07 16:34:50 +0200 |
commit | 93b1e54237fd595a788765c8061c345fba556473 (patch) | |
tree | 57c50910626bf25d12c94f3bd5ccecc1c61b749b /DevTools/UserspaceEmulator | |
parent | 2b3b83801bd70debc8bde4068fecd64aee8160b5 (diff) | |
download | serenity-93b1e54237fd595a788765c8061c345fba556473.zip |
UserspaceEmulator: Add the setpgid syscall
Diffstat (limited to 'DevTools/UserspaceEmulator')
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 7 | ||||
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index 42e2c5a9da..f8c159c5e0 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -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); diff --git a/DevTools/UserspaceEmulator/Emulator.h b/DevTools/UserspaceEmulator/Emulator.h index d83e5270b2..62cabc356a 100644 --- a/DevTools/UserspaceEmulator/Emulator.h +++ b/DevTools/UserspaceEmulator/Emulator.h @@ -138,6 +138,7 @@ private: ssize_t virt$getrandom(FlatPtr buffer, size_t buffer_size, unsigned int flags); int virt$sleep(unsigned); int virt$getpgrp(); + int virt$setpgid(pid_t pid, pid_t pgid); int virt$ttyname(int fd, FlatPtr buffer, size_t buffer_size); int virt$getcwd(FlatPtr buffer, size_t buffer_size); |