mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
Implement basic sys$kill() and add a /bin/kill
All it can do right now is send SIGKILL which just murders the target task.
This commit is contained in:
parent
7be30a2fa8
commit
3218f00099
10 changed files with 117 additions and 9 deletions
14
LibC/signal.cpp
Normal file
14
LibC/signal.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue