1
0
Fork 0
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:
Lucas CHOLLET 2022-01-03 01:58:58 +01:00 committed by Ali Mohammad Pur
parent 9aa0cf3265
commit 3fa5be655d
Notes: sideshowbarker 2024-07-17 21:22:58 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -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);