diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-12-21 06:17:50 +0330 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-12-31 02:19:45 +0330 |
commit | 8de8a7766d38e1539a9b4fdd8ad259017d3d1511 (patch) | |
tree | 32c3e988e19ab82f5c98f506ccba496c2e27296d /Userland/Libraries/LibCore/System.cpp | |
parent | ee46cee31f95b893a89fa6a0bf59396a966296ba (diff) | |
download | serenity-8de8a7766d38e1539a9b4fdd8ad259017d3d1511.zip |
LibCore: Add Core::System::setpgid()
Diffstat (limited to 'Userland/Libraries/LibCore/System.cpp')
-rw-r--r-- | Userland/Libraries/LibCore/System.cpp | 7 |
1 files changed, 7 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); |