diff options
Diffstat (limited to 'Userland/Libraries/LibCore')
-rw-r--r-- | Userland/Libraries/LibCore/System.cpp | 7 | ||||
-rw-r--r-- | Userland/Libraries/LibCore/System.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp index d87ff035ae..f51145fac2 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -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); diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index addd51ddcd..8ea4b27693 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -76,6 +76,7 @@ ErrorOr<void> setuid(uid_t); ErrorOr<void> seteuid(uid_t); ErrorOr<void> setgid(gid_t); ErrorOr<void> setegid(gid_t); +ErrorOr<void> setpgid(pid_t pid, pid_t pgid); ErrorOr<bool> isatty(int fd); ErrorOr<void> symlink(StringView target, StringView link_path); ErrorOr<void> mkdir(StringView path, mode_t); |