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

LibCore: Add kill() syscall wrapper

This commit is contained in:
Andreas Kling 2021-11-23 16:06:56 +01:00
parent e7d4622ce0
commit 8b7b726680
2 changed files with 8 additions and 0 deletions

View file

@ -164,4 +164,11 @@ ErrorOr<ssize_t> write(int fd, void const* data, size_t data_size)
return rc;
}
ErrorOr<void> kill(pid_t pid, int signal)
{
if (::kill(pid, signal) < 0)
return Error::from_syscall("kill"sv, -errno);
return {};
}
}