diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-03-01 20:04:41 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-02 18:08:05 +0100 |
commit | 19d5974e3af301a2ff75863e6f4d9ac01a99a327 (patch) | |
tree | 112a0be514ca8c8a8eb91d8a159609a5c1bc3737 /Userland/Libraries/LibCore/System.cpp | |
parent | 9888e29c14c94fb7883e4134ae4ed278b54ff3f1 (diff) | |
download | serenity-19d5974e3af301a2ff75863e6f4d9ac01a99a327.zip |
LibCore: Add killpg() wrapper
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 bcac0946b4..5092437c85 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -422,6 +422,13 @@ ErrorOr<void> kill(pid_t pid, int signal) return {}; } +ErrorOr<void> killpg(int pgrp, int signal) +{ + if (::killpg(pgrp, signal) < 0) + return Error::from_syscall("killpg"sv, -errno); + return {}; +} + ErrorOr<int> dup(int source_fd) { int fd = ::dup(source_fd); |