mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibCore: Add syscall wrapper for pipe2()
This commit is contained in:
parent
bc2ee02ce0
commit
71bc9bee0a
2 changed files with 9 additions and 0 deletions
|
@ -40,6 +40,14 @@ ErrorOr<void> unveil(StringView path, StringView permissions)
|
|||
int rc = syscall(SC_unveil, ¶ms);
|
||||
HANDLE_SYSCALL_RETURN_VALUE("unveil"sv, rc, {});
|
||||
}
|
||||
|
||||
ErrorOr<Array<int, 2>> pipe2(int flags)
|
||||
{
|
||||
Array<int, 2> fds;
|
||||
if (::pipe2(fds.data(), flags) < 0)
|
||||
return Error::from_syscall("pipe2"sv, -errno);
|
||||
return fds;
|
||||
}
|
||||
#endif
|
||||
|
||||
ErrorOr<void> sigaction(int signal, struct sigaction const* action, struct sigaction* old_action)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue