]> git.corax.cc Git - corax/commitdiff
Call process_exit() from sys_exit()
authorMatthias Kruk <m@m10k.eu>
Tue, 29 Oct 2019 05:11:41 +0000 (14:11 +0900)
committerMatthias Kruk <m@m10k.eu>
Tue, 29 Oct 2019 05:11:41 +0000 (14:11 +0900)
kernel/core/posixcall.c

index 7223ed3b098b8efd410bbcce72d6a6da1008c728..7e0ca4cc35a162273eb61277ea08886a5d953665 100644 (file)
@@ -5,10 +5,21 @@
 #include <corax/errno.h>
 #include <corax/syscall.h>
 #include <corax/types.h>
+#include <process.h>
 
 int sys_exit(int status)
 {
-       return(-ENOSYS);
+       process_t *proc;
+       int ret_val;
+
+       proc = process_get_current();
+       ret_val = -EFAULT;
+
+       if(proc) {
+               ret_val = process_exit(proc, status);
+       }
+
+       return(ret_val);
 }
 
 int sys_fork(void)