1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibCore: Add killpg() wrapper

This commit is contained in:
Lucas CHOLLET 2022-03-01 20:04:41 +01:00 committed by Andreas Kling
parent 9888e29c14
commit 19d5974e3a
2 changed files with 8 additions and 0 deletions

View file

@ -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);