From 19d5974e3af301a2ff75863e6f4d9ac01a99a327 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Tue, 1 Mar 2022 20:04:41 +0100 Subject: LibCore: Add killpg() wrapper --- Userland/Libraries/LibCore/System.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Userland/Libraries/LibCore/System.cpp') 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 kill(pid_t pid, int signal) return {}; } +ErrorOr killpg(int pgrp, int signal) +{ + if (::killpg(pgrp, signal) < 0) + return Error::from_syscall("killpg"sv, -errno); + return {}; +} + ErrorOr dup(int source_fd) { int fd = ::dup(source_fd); -- cgit v1.2.3