1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:05:08 +00:00
serenity/LibC/signal.cpp
Andreas Kling 3218f00099 Implement basic sys$kill() and add a /bin/kill
All it can do right now is send SIGKILL which just murders the target task.
2018-10-31 01:06:57 +01:00

14 lines
230 B
C++

#include "unistd.h"
#include "errno.h"
#include <Kernel/Syscall.h>
extern "C" {
int kill(pid_t pid, int sig)
{
int rc = Syscall::invoke(Syscall::PosixKill, (dword)pid, (dword)sig);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}