mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibCore: Add a wrapper for setsid()
This commit is contained in:
parent
9aa0cf3265
commit
3fa5be655d
Notes:
sideshowbarker
2024-07-17 21:22:58 +09:00
Author: https://github.com/LucasChollet
Commit: 3fa5be655d
Pull-request: https://github.com/SerenityOS/serenity/pull/11582
Reviewed-by: https://github.com/alimpfard
2 changed files with 9 additions and 0 deletions
|
@ -551,6 +551,14 @@ ErrorOr<void> setpgid(pid_t pid, pid_t pgid)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<pid_t> setsid()
|
||||
{
|
||||
int rc = ::setsid();
|
||||
if (rc < 0)
|
||||
return Error::from_syscall("setsid"sv, -errno);
|
||||
return rc;
|
||||
}
|
||||
|
||||
ErrorOr<bool> isatty(int fd)
|
||||
{
|
||||
int rc = ::isatty(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue