🆕 exec (存在bug

This commit is contained in:
fslongjin
2022-05-31 21:55:06 +08:00
parent 844e66f6bb
commit e2a59dbd43
24 changed files with 494 additions and 90 deletions

View File

@ -1,6 +1,7 @@
#include <libc/unistd.h>
#include <libc/stdlib.h>
#include <libc/ctype.h>
#include <libsystem/syscall.h>
int abs(int i)
{
@ -43,4 +44,14 @@ int atoi(const char *str)
}
return neg ? n : -n;
}
/**
* @brief 退出进程
*
* @param status
*/
void exit(int status)
{
syscall_invoke(SYS_EXIT, status, 0, 0, 0, 0, 0, 0, 0);
}