mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibCore: Add syscall wrapper for fork()
This commit is contained in:
parent
01c2756e9a
commit
2637a64130
2 changed files with 9 additions and 0 deletions
|
@ -480,4 +480,12 @@ ErrorOr<void> mkdir(StringView path, mode_t mode)
|
|||
#endif
|
||||
}
|
||||
|
||||
ErrorOr<pid_t> fork()
|
||||
{
|
||||
pid_t pid = ::fork();
|
||||
if (pid < 0)
|
||||
return Error::from_syscall("fork"sv, -errno);
|
||||
return pid;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue