mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 17:37:35 +00:00
Kernel: Only require "stdio" pledge for sending signals to self
This should match what OpenBSD does. Sending a signal to yourself seems basically harmless.
This commit is contained in:
parent
ead1273632
commit
5ce9382e98
1 changed files with 5 additions and 1 deletions
|
@ -2128,7 +2128,11 @@ KResult Process::do_killpg(pid_t pgrp, int signal)
|
||||||
|
|
||||||
int Process::sys$kill(pid_t pid, int signal)
|
int Process::sys$kill(pid_t pid, int signal)
|
||||||
{
|
{
|
||||||
|
if (pid == m_pid)
|
||||||
|
REQUIRE_PROMISE(stdio);
|
||||||
|
else
|
||||||
REQUIRE_PROMISE(proc);
|
REQUIRE_PROMISE(proc);
|
||||||
|
|
||||||
if (signal < 0 || signal >= 32)
|
if (signal < 0 || signal >= 32)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (pid <= 0)
|
if (pid <= 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue