mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 12:14:58 +00:00
Kernel: Do not require 'proc' promise in getsid() and getpgid()
These only require 'stdio' according to: https://man.openbsd.org/pledge.2
This commit is contained in:
parent
74018be739
commit
97d15e9b8f
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ namespace Kernel {
|
||||||
ErrorOr<FlatPtr> Process::sys$getsid(pid_t pid)
|
ErrorOr<FlatPtr> Process::sys$getsid(pid_t pid)
|
||||||
{
|
{
|
||||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||||
TRY(require_promise(Pledge::proc));
|
TRY(require_promise(Pledge::stdio));
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
return sid().value();
|
return sid().value();
|
||||||
auto process = Process::from_pid(pid);
|
auto process = Process::from_pid(pid);
|
||||||
|
@ -49,7 +49,7 @@ ErrorOr<FlatPtr> Process::sys$setsid()
|
||||||
ErrorOr<FlatPtr> Process::sys$getpgid(pid_t pid)
|
ErrorOr<FlatPtr> Process::sys$getpgid(pid_t pid)
|
||||||
{
|
{
|
||||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
|
||||||
TRY(require_promise(Pledge::proc));
|
TRY(require_promise(Pledge::stdio));
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
return pgid().value();
|
return pgid().value();
|
||||||
auto process = Process::from_pid(pid);
|
auto process = Process::from_pid(pid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue