diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-27 18:05:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-27 19:10:18 +0200 |
commit | b9b74e355a70b279133967ae36f1ee023d2b1bff (patch) | |
tree | afcc0e838a710a36e02d96e48ddb2eb9c9effc4f /DevTools | |
parent | 7bb6b1d44d2cb00b21fbbd9473beb22646b71f92 (diff) | |
download | serenity-b9b74e355a70b279133967ae36f1ee023d2b1bff.zip |
UserspaceEmulator: Implement the fork() syscall :^)
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.cpp | 8 | ||||
-rw-r--r-- | DevTools/UserspaceEmulator/Emulator.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/DevTools/UserspaceEmulator/Emulator.cpp b/DevTools/UserspaceEmulator/Emulator.cpp index 42cc29c3e5..10d6734e29 100644 --- a/DevTools/UserspaceEmulator/Emulator.cpp +++ b/DevTools/UserspaceEmulator/Emulator.cpp @@ -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(); +} + } diff --git a/DevTools/UserspaceEmulator/Emulator.h b/DevTools/UserspaceEmulator/Emulator.h index 2093e3d30f..6da4bb98f8 100644 --- a/DevTools/UserspaceEmulator/Emulator.h +++ b/DevTools/UserspaceEmulator/Emulator.h @@ -70,6 +70,7 @@ private: void setup_stack(const Vector<String>& arguments, const Vector<String>& environment); + int virt$fork(); int virt$get_dir_entries(int fd, FlatPtr buffer, ssize_t); int virt$ioctl(int fd, unsigned, FlatPtr); int virt$usleep(useconds_t); |