kernel: Remove the 'signal' promise and make signal functions require stdio instead
Some checks failed
continuous-integration/drone/push Build is failing

This follows OpenBSD and makes it so stdio is sufficient for an abort() call.
This commit is contained in:
apio 2023-08-22 13:34:30 +02:00
parent 746834e2d9
commit 993e94cc76
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
#define enumerate_promises(_p) \
_p(stdio) _p(rpath) _p(wpath) _p(cpath) _p(fattr) _p(chown) _p(unix) _p(tty) _p(proc) _p(exec) _p(prot_exec) \
_p(id) _p(mount) _p(signal) _p(host) _p(error)
_p(id) _p(mount) _p(host) _p(error)
enum class Promise
{

View File

@ -19,7 +19,7 @@ Result<u64> sys_sigreturn(Registers* regs, SyscallArgs)
Result<u64> sys_sigaction(Registers*, SyscallArgs args)
{
auto* current = Scheduler::current();
TRY(check_pledge(current, Promise::p_signal));
TRY(check_pledge(current, Promise::p_stdio));
int signo = (int)args[0];
const struct sigaction* act = (const struct sigaction*)args[1];
@ -71,7 +71,7 @@ Result<u64> sys_kill(Registers*, SyscallArgs args)
Result<u64> sys_sigprocmask(Registers*, SyscallArgs args)
{
auto* current = Scheduler::current();
TRY(check_pledge(current, Promise::p_signal));
TRY(check_pledge(current, Promise::p_stdio));
int how = (int)args[0];
const sigset_t* set = (const sigset_t*)args[1];