1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibCore: Add Core::System::setpgid()

This commit is contained in:
Ali Mohammad Pur 2021-12-21 06:17:50 +03:30 committed by Ali Mohammad Pur
parent ee46cee31f
commit 8de8a7766d
2 changed files with 8 additions and 0 deletions

View file

@ -477,6 +477,13 @@ ErrorOr<void> setegid(gid_t gid)
return {};
}
ErrorOr<void> setpgid(pid_t pid, pid_t pgid)
{
if (::setpgid(pid, pgid) < 0)
return Error::from_syscall("setpgid"sv, -errno);
return {};
}
ErrorOr<bool> isatty(int fd)
{
int rc = ::isatty(fd);