From: Matthias Kruk Date: Tue, 29 Oct 2019 05:11:41 +0000 (+0900) Subject: Call process_exit() from sys_exit() X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=25fea2b2d8942f0ea8a26d0f5407090091289a3b;p=corax Call process_exit() from sys_exit() --- diff --git a/kernel/core/posixcall.c b/kernel/core/posixcall.c index 7223ed3..7e0ca4c 100644 --- a/kernel/core/posixcall.c +++ b/kernel/core/posixcall.c @@ -5,10 +5,21 @@ #include #include #include +#include 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)