signals: more general changes

This commit is contained in:
Matheus
2024-05-17 18:48:57 -03:00
parent 7b0cc4c51b
commit 1b63e9b436
13 changed files with 135 additions and 54 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#include <kernel/syscalls.h>
#include <arch/cpu.h>
#include <logging.h>
#include <kernel/jobctl.h>
syscallret_t syscall_kill(context_t *context, int pid, int signal) {
syscallret_t ret = {
@@ -23,7 +24,7 @@ syscallret_t syscall_kill(context_t *context, int pid, int signal) {
return ret;
}
proc_t *target = sched_getprocfrompid(pid);
proc_t *target = sched_getprocfrompid(effectivepid);
if (target == NULL && pid != 0) {
ret.errno = ESRCH;
return ret;