mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibCore: Add tcsetpgrp(int, pid_t) wrapper
This commit is contained in:
parent
19d5974e3a
commit
b1af1b399e
2 changed files with 9 additions and 0 deletions
|
@ -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())
|
||||
|
|
|
@ -86,6 +86,7 @@ ErrorOr<String> getcwd();
|
|||
ErrorOr<void> ioctl(int fd, unsigned request, ...);
|
||||
ErrorOr<struct termios> tcgetattr(int fd);
|
||||
ErrorOr<void> tcsetattr(int fd, int optional_actions, struct termios const&);
|
||||
ErrorOr<int> tcsetpgrp(int fd, pid_t pgrp);
|
||||
ErrorOr<void> chmod(StringView pathname, mode_t mode);
|
||||
ErrorOr<void> lchown(StringView pathname, uid_t uid, gid_t gid);
|
||||
ErrorOr<void> chown(StringView pathname, uid_t uid, gid_t gid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue