mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:57:45 +00:00
LibSystem: Add ErrorOr<T> wrapper for sigaction() :^)
This commit is contained in:
parent
843262497a
commit
3d34216b9a
2 changed files with 8 additions and 0 deletions
|
@ -35,4 +35,10 @@ ErrorOr<void> unveil(StringView path, StringView permissions)
|
|||
HANDLE_SYSCALL_RETURN_VALUE("unveil"sv, rc);
|
||||
}
|
||||
|
||||
ErrorOr<void> sigaction(int signal, struct sigaction const* action, struct sigaction* old_action)
|
||||
{
|
||||
int rc = syscall(SC_sigaction, signal, action, old_action);
|
||||
HANDLE_SYSCALL_RETURN_VALUE("sigaction"sv, rc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <signal.h>
|
||||
|
||||
namespace System {
|
||||
|
||||
ErrorOr<void> pledge(StringView promises, StringView execpromises);
|
||||
ErrorOr<void> unveil(StringView path, StringView permissions);
|
||||
ErrorOr<void> sigaction(int signal, struct sigaction const* action, struct sigaction* old_action);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue