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

LibCore: Add tcsetpgrp(int, pid_t) wrapper

This commit is contained in:
Lucas CHOLLET 2022-03-01 20:05:14 +01:00 committed by Andreas Kling
parent 19d5974e3a
commit b1af1b399e
2 changed files with 9 additions and 0 deletions

View file

@ -507,6 +507,14 @@ ErrorOr<void> tcsetattr(int fd, int optional_actions, struct termios const& ios)
return {};
}
ErrorOr<int> tcsetpgrp(int fd, pid_t pgrp)
{
int rc = ::tcsetpgrp(fd, pgrp);
if (rc < 0)
return Error::from_syscall("tcsetpgrp"sv, -errno);
return { rc };
}
ErrorOr<void> chmod(StringView pathname, mode_t mode)
{
if (!pathname.characters_without_null_termination())