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
commit 8de8a7766d
Notes: sideshowbarker 2024-07-17 21:53:31 +09:00
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);