mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
Kernel: Require "stdio" pledge promise when calling get_root_session_id
This commit is contained in:
parent
a5ff6769f5
commit
16b6e644d7
Notes:
sideshowbarker
2024-07-17 03:16:02 +09:00
Author: https://github.com/supercomputer7
Commit: 16b6e644d7
Pull-request: https://github.com/SerenityOS/serenity/pull/16985
Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 0 deletions
|
@ -141,6 +141,7 @@ ErrorOr<FlatPtr> Process::sys$setpgid(pid_t specified_pid, pid_t specified_pgid)
|
|||
|
||||
ErrorOr<FlatPtr> Process::sys$get_root_session_id(pid_t force_sid)
|
||||
{
|
||||
TRY(require_promise(Pledge::stdio));
|
||||
pid_t sid = (force_sid == -1) ? this->sid().value() : force_sid;
|
||||
if (sid == 0)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue