kernel: implement sys_fork

This commit is contained in:
DH 2024-09-02 20:31:00 +03:00
parent b32b4e1c60
commit d54fc9764f
3 changed files with 28 additions and 3 deletions

View file

@ -5,7 +5,12 @@
#include <cstdlib>
#include <unistd.h>
orbis::SysResult orbis::sys_fork(Thread *thread) { return ErrorCode::NOSYS; }
orbis::SysResult orbis::sys_fork(Thread *thread) {
if (auto fork = thread->tproc->ops->fork) {
return fork(thread, RFFDG | RFPROC);
}
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_pdfork(Thread *thread, ptr<sint> fdp, sint flags) {
return ErrorCode::NOSYS;
}