summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
authordzwdz2023-01-08 21:14:03 +0100
committerdzwdz2023-01-08 21:14:03 +0100
commitc178ab5d5ca328d5b0072d54e3dc66d1b198df7b (patch)
tree0f9e3da6fc6133ab4bab052661bf8903e354d804 /src/kernel/syscalls.c
parent5defe97cc8b870fa50ba01999f80974b8b21c5b5 (diff)
kernel: let parents kill their children again
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 8e42f8e..8bd7de3 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -367,6 +367,10 @@ void _syscall_sleep(long ms) {
timer_schedule(process_current, uptime_ms() + ms);
}
+void _syscall_filicide(void) {
+ process_filicide(process_current, -1);
+}
+
long _syscall_execbuf(void __user *ubuf, size_t len) {
if (len == 0) SYSCALL_RETURN(0);
if (len > EXECBUF_MAX_LEN)
@@ -416,6 +420,7 @@ long _syscall(long num, long a, long b, long c, long d, long e) {
break; case _SYSCALL_MEMFLAG: _syscall_memflag((userptr_t)a, b, c);
break; case _SYSCALL_PIPE: _syscall_pipe((userptr_t)a, b);
break; case _SYSCALL_SLEEP: _syscall_sleep(a);
+ break; case _SYSCALL_FILICIDE: _syscall_filicide();
break; case _SYSCALL_EXECBUF: _syscall_execbuf((userptr_t)a, b);
break; case _SYSCALL_DEBUG_KLOG: _syscall_debug_klog((userptr_t)a, b);
break;