summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/System.cpp
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-12-21 06:17:50 +0330
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-12-31 02:19:45 +0330
commit8de8a7766d38e1539a9b4fdd8ad259017d3d1511 (patch)
tree32c3e988e19ab82f5c98f506ccba496c2e27296d /Userland/Libraries/LibCore/System.cpp
parentee46cee31f95b893a89fa6a0bf59396a966296ba (diff)
downloadserenity-8de8a7766d38e1539a9b4fdd8ad259017d3d1511.zip
LibCore: Add Core::System::setpgid()
Diffstat (limited to 'Userland/Libraries/LibCore/System.cpp')
-rw-r--r--Userland/Libraries/LibCore/System.cpp7
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);