UserspaceEmulator: Forward errors from fork() correctly

This commit is contained in:
Andreas Kling 2020-08-01 08:20:13 +02:00
parent 3455876976
commit 5de7bae383
Notes: sideshowbarker 2024-07-19 04:25:06 +09:00

View file

@ -888,7 +888,10 @@ int Emulator::virt$ioctl(int fd, unsigned request, FlatPtr arg)
int Emulator::virt$fork()
{
return fork();
int rc = fork();
if (rc < 0)
return -errno;
return rc;
}
int Emulator::virt$execve(FlatPtr params_addr)